On Mon, 23 Nov 2009, double wrote:

Since february we had three or four times, that the connection loop turned into an infinite loop:

Have you upgraded the libssh2 along the way, or are you still running the same version you had in February? If so, it's time you upgrade...

int rc;
while( (rc = libssh2_session_startup(session, sock)) == LIBSSH2_ERROR_EAGAIN )
{
  if( ! socket_select_write(sock) )
      break;
}

Is it wrong to wait for a write-socket

It is wrong to assume that it is a wrote socket, yes. libssh2_session_block_directions() was added for exactly that reason.

or is this an issue in libssh2_session_startup()?

Could be, but I'm not aware of any such in the most recent version.

--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to