Properly reset socket blocking state on close

This commit is contained in:
Fabio Alessandrelli 2018-08-31 03:21:32 +02:00
parent c7fc3dcab3
commit d3108985e0
2 changed files with 2 additions and 0 deletions

View file

@ -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;
}

View file

@ -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;
}