summaryrefslogtreecommitdiff
path: root/osdep/Phy.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/Phy.hpp')
-rw-r--r--osdep/Phy.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp
index 8b6db36b..7dc0b5dd 100644
--- a/osdep/Phy.hpp
+++ b/osdep/Phy.hpp
@@ -974,6 +974,11 @@ public:
case ZT_PHY_SOCKET_UNIX_IN: {
#ifdef __UNIX_LIKE__
ZT_PHY_SOCKFD_TYPE sock = s->sock; // if closed, s->sock becomes invalid as s is no longer dereferencable
+ if ((FD_ISSET(sock,&wfds))&&(FD_ISSET(sock,&_writefds))) {
+ try {
+ _handler->phyOnUnixWritable((PhySocket *)&(*s),&(s->uptr));
+ } catch ( ... ) {}
+ }
if (FD_ISSET(sock,&rfds)) {
long n = (long)::read(sock,buf,sizeof(buf));
if (n <= 0) {
@@ -984,11 +989,6 @@ public:
} catch ( ... ) {}
}
}
- if ((FD_ISSET(sock,&wfds))&&(FD_ISSET(sock,&_writefds))) {
- try {
- //_handler->phyOnUnixWritable((PhySocket *)&(*s),&(s->uptr));
- } catch ( ... ) {}
- }
#endif // __UNIX_LIKE__
} break;