mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-01 11:26:53 +03:00
example, test_ssh2: shutdown socket before close
Syncing them with `tests/session_fixture.c`. Cherry-picked from #1017
This commit is contained in:
@ -228,6 +228,7 @@ shutdown:
|
||||
}
|
||||
|
||||
if(sock != LIBSSH2_INVALID_SOCKET) {
|
||||
shutdown(sock, 2 /* SHUT_RDWR */);
|
||||
#ifdef WIN32
|
||||
closesocket(sock);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user