1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-28 01:41:49 +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:
Viktor Szakats
2023-05-02 11:25:49 +00:00
parent e99c84f682
commit d70919fb00
25 changed files with 36 additions and 1 deletions

View File

@ -284,6 +284,7 @@ shutdown:
}
if(sock != LIBSSH2_INVALID_SOCKET) {
shutdown(sock, 2);
#ifdef WIN32
closesocket(sock);
#else