summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/channels.c b/src/channels.c
index ca730868..23376ac3 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -2350,6 +2350,7 @@ int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_std
ssh_session session = channel->session;
ssh_buffer stdbuf = channel->stdout_buffer;
uint32_t len;
+ int rc;
enter_function();
@@ -2398,7 +2399,10 @@ int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_std
break;
}
- ssh_handle_packets(session, -2);
+ rc = ssh_handle_packets(session, -2);
+ if (rc != SSH_OK) {
+ return rc;
+ }
}
len = buffer_get_rest_len(stdbuf);