Subject: Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

From: Daniel Stenberg <>
Date: Sun, 18 Jul 2010 20:06:31 +0200 (CEST)

On Sun, 18 Jul 2010, Jan Van Boghout wrote:

>> I also don't think it should occur. Are you seeing it? The error code
>> is used internally to create the simulated blocking API, so if one
>> checks for an error code when there was in fact no error then you're
>> pretty sure to get EAGAIN as the error code, since that was the last
>> error libssh2 generated,

> Oops, this was indeed a case of code blindness on my part. Everything is
> working as it should!

I've just pushed a change now that should make this situation less frequent,
in that the internal _libssh2_wait_socket() function will now clear the error
code. That should be the primary function that gets used after EAGAIN is set
and used internally during blocking mode.

Received on 2010-07-18