Subject: Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

Re: Blocking mode and LIBSSH2_ERROR_EAGAIN

From: Daniel Stenberg <daniel_at_haxx.se>
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.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-07-18