mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
client: Do not close the socket if it was set via options
Fixes #122 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
442599f0d1
commit
4b20d7ad18
@@ -720,7 +720,10 @@ ssh_disconnect(ssh_session session)
|
||||
}
|
||||
|
||||
ssh_packet_send(session);
|
||||
ssh_socket_close(session->socket);
|
||||
/* Do not close the socket, if the fd was set via options. */
|
||||
if (session->opts.fd == SSH_INVALID_SOCKET) {
|
||||
ssh_socket_close(session->socket);
|
||||
}
|
||||
}
|
||||
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user