diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2013-08-27 18:00:07 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2013-08-27 18:00:07 -0400 |
| commit | 01a70d09db917ce475120854514ee48af43cc1b1 (patch) | |
| tree | bef52e0bac273766396062d87dd6d3d491911e42 /node/Demarc.cpp | |
| parent | 0afcf4877c9694a517a5bf62b604387eb2099aba (diff) | |
| download | infinitytier-01a70d09db917ce475120854514ee48af43cc1b1.tar.gz infinitytier-01a70d09db917ce475120854514ee48af43cc1b1.zip | |
Jigger with shutdown method to avoid a crash on CTRL+C in Windows. Feels a big hacky, might revisit later.
Diffstat (limited to 'node/Demarc.cpp')
| -rw-r--r-- | node/Demarc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/node/Demarc.cpp b/node/Demarc.cpp index 0bb1646d..ddbed6c8 100644 --- a/node/Demarc.cpp +++ b/node/Demarc.cpp @@ -210,7 +210,8 @@ Demarc::Port Demarc::send(Demarc::Port fromPort,const InetAddress &to,const void void Demarc::_CBudpSocketPacketHandler(UdpSocket *sock,void *arg,const InetAddress &from,const void *data,unsigned int len) { - ((DemarcPortObj *)arg)->parent->_r->sw->onRemotePacket(((DemarcPortObj *)arg)->port,from,Buffer<4096>(data,len)); + if (!((DemarcPortObj *)arg)->parent->_r->shutdownInProgress) + ((DemarcPortObj *)arg)->parent->_r->sw->onRemotePacket(((DemarcPortObj *)arg)->port,from,Buffer<4096>(data,len)); } } // namespace ZeroTier |
