mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 10:27:22 +09:00
Fixed blocking bug in channel_poll.
This is a backport from 514ab6eed2.
This commit is contained in:
@@ -2007,9 +2007,10 @@ int channel_poll(ssh_channel channel, int is_stderr){
|
||||
stdbuf = channel->stderr_buffer;
|
||||
}
|
||||
|
||||
while (buffer_get_rest_len(stdbuf) == 0 && channel->remote_eof == 0) {
|
||||
if (ssh_handle_packets(channel->session) <= 0) {
|
||||
break;
|
||||
if (buffer_get_rest_len(stdbuf) == 0 && channel->remote_eof == 0) {
|
||||
if (ssh_handle_packets(channel->session) == SSH_ERROR) {
|
||||
leave_function();
|
||||
return SSH_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user