Subject: Re: [libssh2] SFTP read hanging forever (LIBSSH2_ERROR_EAGAIN)

Re: [libssh2] SFTP read hanging forever (LIBSSH2_ERROR_EAGAIN)

From: Daniel Stenberg <>
Date: Tue, 25 Sep 2007 22:57:25 +0200 (CEST)

On Tue, 25 Sep 2007, wrote:

> 1) If i use a window size of 32768 at a certain point the libssh2_sftp_read
> returns a EAGAIN value forever. The select doesn't return any negative or
> zero values, meaning probably that the library is not reading anymore from
> the socket ... This problem presents itself in a quite random fashion, so
> sometimes the file is downloaded sometimes not.

What libssh2 version? And what window size mod was a plain source code
modification, wasn't it?

> 2) Lowering the download windows size, library seems to work correctly. But
> i tried to do an experiment: while download was in progress i put the
> openSSH server offline (unpluggin the cable) the result was that the library
> libssh2_sftp_read returned a EAGAIN value forever, and the select didn't
> fail at all.

Sounds like there's a (at least one) bug somewhere in there then...

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
libssh2-devel mailing list
Received on 2007-09-25