diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-08-31 03:21:32 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-09-12 12:50:53 +0200 |
commit | d3108985e07d442aa90260b0830b3b46f9f4dcad (patch) | |
tree | 12bd8cc6bbcc01f34174c372bf894be214274532 /drivers | |
parent | c7fc3dcab3c030ba8428036f6cbb1350b5312f8e (diff) |
Properly reset socket blocking state on close
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/packet_peer_udp_posix.cpp | 1 | ||||
-rw-r--r-- | drivers/windows/packet_peer_udp_winsock.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp index 1380c1d88b..1cb530420e 100644 --- a/drivers/unix/packet_peer_udp_posix.cpp +++ b/drivers/unix/packet_peer_udp_posix.cpp @@ -164,6 +164,7 @@ void PacketPeerUDPPosix::close() { ::close(sockfd); sockfd = -1; sock_type = IP::TYPE_NONE; + sock_blocking = true; rb.resize(16); queue_count = 0; } diff --git a/drivers/windows/packet_peer_udp_winsock.cpp b/drivers/windows/packet_peer_udp_winsock.cpp index 66221774b2..f7c3637e7e 100644 --- a/drivers/windows/packet_peer_udp_winsock.cpp +++ b/drivers/windows/packet_peer_udp_winsock.cpp @@ -155,6 +155,7 @@ void PacketPeerUDPWinsock::close() { ::closesocket(sockfd); sockfd = -1; sock_type = IP::TYPE_NONE; + sock_blocking = true; rb.resize(16); queue_count = 0; } |