aboutsummaryrefslogtreecommitdiff
path: root/libssh/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/channels.c')
-rw-r--r--libssh/channels.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index c881bd0a..c4e81680 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -2161,8 +2161,10 @@ int channel_poll(ssh_channel channel, int is_stderr){
}
}
- if (buffer_get_rest_len(stdbuf) > 0)
- return buffer_get_rest_len(stdbuf);
+ if (buffer_get_rest_len(stdbuf) > 0){
+ leave_function();
+ return buffer_get_rest_len(stdbuf);
+ }
if (channel->remote_eof) {
leave_function();