Skip to content

Commit

Permalink
Call shutdown before close on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Aug 15, 2024
1 parent 6e25ae4 commit 0dc9743
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ inline void closeSocket(SOCKET socket) {

if (socket != INVALID_SOCKET) {
#ifdef _WIN32
shutdown(socket, SD_BOTH);
closesocket(socket);
#else
shutdown(socket, SHUT_RD);
Expand Down

0 comments on commit 0dc9743

Please sign in to comment.