_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:
Daniel Stenberg 2009-08-25 00:25:08 +02:00
parent f64a84a909
commit a1365916c7

View File

@ -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;
}