diff options
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/channels.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/channels.c b/libssh/channels.c index 2b78645f..23f4ceb5 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -904,7 +904,9 @@ int channel_write(CHANNEL *channel, const void *data, u32 len) { /* What happens when the channel window is zero? */ while(channel->remote_window == 0) { /* parse every incoming packet */ - packet_wait(channel->session, 0, 0); + if (packet_wait(channel->session, 0, 0) == SSH_ERROR) { + goto error; + } } effectivelen = len > channel->remote_window ? channel->remote_window : len; } else { |