mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +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,8 +720,11 @@ ssh_disconnect(ssh_session session)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ssh_packet_send(session);
|
ssh_packet_send(session);
|
||||||
|
/* Do not close the socket, if the fd was set via options. */
|
||||||
|
if (session->opts.fd == SSH_INVALID_SOCKET) {
|
||||||
ssh_socket_close(session->socket);
|
ssh_socket_close(session->socket);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
session->recv_seq = 0;
|
session->recv_seq = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user