Subject: Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

From: Jan Van Boghout <>
Date: Sun, 18 Jul 2010 15:18:30 +0200

Peter Stuge wrote:

> Jan Van Boghout wrote:
>> Could someone enlighten me about the exact meaning of a
>> LIBSSH2_ERROR_EAGAIN return value when libssh2 is in blocking mode?
>> I was under the impression that this shouldn't occur, but that's
>> apparently not the case.
> 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, just that the blocking simulation handled
> it, and later when the error code is being checked without there
> being an error, it is still set to EAGAIN.

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

Received on 2010-07-18