From a1365916c74c06c8adbcf6c9502a3899ee8beb07 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Aug 2009 00:25:08 +0200 Subject: [PATCH] _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() --- src/channel.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/channel.c b/src/channel.c index 6999d3bd..d0ba022a 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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; }