_libssh2_channel_write: handle window_size == 0 better
When about to send data on the channel and the window size is 0, we must not just return 0 if the transport_read() function returned EAGAIN as it then causes a busy-loop. Bug: http://libssh2.org/mail/libssh2-devel-archive-2011-08/0011.shtml
Этот коммит содержится в:
родитель
79f48e4881
Коммит
3c71ad4fce
@ -2022,7 +2022,7 @@ _libssh2_channel_write(LIBSSH2_CHANNEL *channel, int stream_id,
|
||||
|
||||
if(channel->local.window_size <= 0)
|
||||
/* there's no room for data so we stop */
|
||||
return 0;
|
||||
return (rc==LIBSSH2_ERROR_EAGAIN?rc:0);
|
||||
|
||||
channel->write_bufwrite = buflen;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user