Subject: Re: libssh2 thread safety

Re: libssh2 thread safety

From: Peter Stuge <peter_at_stuge.se>
Date: Tue, 17 Apr 2012 05:06:57 +0200

Peter Stuge wrote:
> Jasmeet Bagga wrote:
> >>> [libssh2] 0.956992 Socket: Recved 0 bytes banner
> >>> [libssh2] 0.956996 Failure Event: -43 - Failed getting banner
> >>> [libssh2] 0.957045 Transport: Disconnecting: reason=11, desc=, lang=
> >>
> >> The log shows that the problem is very very early.
> >
> > JFYI, the problem was that the remote device has a very low rate
> > limit for ssh connections and it was abruptly terminating ssh
> > connections (after the TCP connection succeeded), leading to the
> > above seen errors.
>
> Sure.
>
> So one thing that could be improved about libssh2 here is the
> reported error. Currently you get LIBSSH2_ERROR_SOCKET_RECV but it
> could be made more clear that the connection was unexpectedly closed.
>
> Do you have some suggestion for a more useful error code?

How about the attached?

//Peter

Received on 2012-04-17