From 00aa115898e88f1a979fa3074bbcb25ac8b3ab4c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 9 Jun 2015 16:30:44 +0200 Subject: [PATCH] Allow double-close just in case in Phy<> --- osdep/Phy.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp index 8287a7800..ec01625ba 100644 --- a/osdep/Phy.hpp +++ b/osdep/Phy.hpp @@ -739,6 +739,8 @@ public: if (!sock) return; PhySocketImpl &sws = *(reinterpret_cast(sock)); + if (sws.type == ZT_PHY_SOCKET_CLOSED) + return; FD_CLR(sws.sock,&_readfds); FD_CLR(sws.sock,&_writefds);