_libssh2_channel_write() must not invent EAGAIN situations
it is important that only the transport layer can generate EAGAIN error codes so that we limit where we need to set direction bits and more. When the local window is too small to send data we simply stop trying to send and (risk) returning zero in _libssh2_channel_write()
This commit is contained in:
parent
f64a84a909
commit
a1365916c7
@ -2018,11 +2018,6 @@ _libssh2_channel_write(LIBSSH2_CHANNEL *channel, int stream_id,
|
||||
|
||||
if(channel->local.window_size <= 0) {
|
||||
/* there's no more room for data so we stop sending now */
|
||||
if(!wrote) {
|
||||
/* if nothing has been written at this point we're at an
|
||||
EAGAIN point */
|
||||
return PACKET_EAGAIN;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user