Subject: Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

From: Peter Stuge <>
Date: Sat, 17 Jul 2010 18:59:38 +0200

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.

Received on 2010-07-17