diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp index 1380c1d88b9..1cb530420ea 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 66221774b21..f7c3637e7e0 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; }