Subject: Re: channel_read

Re: channel_read

From: Ben Kibbey <bjk_at_luxsci.net>
Date: Tue, 23 Jun 2009 19:11:48 -0400

On Tue, Jun 23, 2009 at 07:45:58AM +0200, Daniel Stenberg wrote:
> On Mon, 22 Jun 2009, Ben Kibbey wrote:
>
> > The problem is that _libssh2_transport_read() blocks until there is data to
> > be read which causes libssh2_channel_write() and libssh2_channel_read() to
> > block. If _libssh2_recv() could be made to always do a non-blocking read,
> > then restore the flags of the channel FD then this fixes things.
>
> libssh2 sets the socket to non-blocking when libssh2_session_startup() is
> called and it is never set back during the entire "session" until
> libssh2_session_free(). Thus I don't understand your conclusions nor fix...

Your right. I made a mistake of resetting O_NONBLOCK somewhere in my
code. Sorry for the false alarm.

-- 
Ben Kibbey (bjk) @ FreeNode/OFTC/Jabber
------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-06-24