mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Make function ssh_channel_accept() nonblocking if timeout is 0.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
6a0787a366
commit
5157d96958
@@ -1997,7 +1997,11 @@ static ssh_channel ssh_channel_accept(ssh_session session, int channeltype,
|
||||
* 50 ms. So we need to decrement by 100 ms.
|
||||
*/
|
||||
for (t = timeout_ms; t >= 0; t -= 100) {
|
||||
ssh_handle_packets(session, 50);
|
||||
if (timeout_ms == 0) {
|
||||
ssh_handle_packets(session, 0);
|
||||
} else {
|
||||
ssh_handle_packets(session, 50);
|
||||
}
|
||||
|
||||
if (session->ssh_message_list) {
|
||||
iterator = ssh_list_get_iterator(session->ssh_message_list);
|
||||
|
||||
Reference in New Issue
Block a user