Subject: Re: libssh2_session_free changes nonblock state of already unused fd

Re: libssh2_session_free changes nonblock state of already unused fd

From: Steven Ayre <steveayre_at_gmail.com>
Date: Fri, 28 Oct 2011 12:09:45 +0200

Oh ok, my mistake then.

Steve on iPhone

On 28 Oct 2011, at 11:44, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 28 Oct 2011, Steven Ayre wrote:
>
>> There is a libssh2_disconnect function that will send the disconnect SSH message and close the socket. Instead of closing the socket yourself you should be calling that.
>
> That's not correct. libssh2_session_disconnect_ex() exists yes and it disconnects the session SSH-wise, but it doesn't actually call close on the socket.
>
> The application created the socket before it handed it over to libssh2 and it is expected to also close the socket once libssh2 has given back control of it.
>
> --
>
> / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-10-28