Jigger with shutdown method to avoid a crash on CTRL+C in Windows. Feels a big hacky, might revisit later.

This commit is contained in:
Adam Ierymenko
2013-08-27 18:00:07 -04:00
parent 0afcf4877c
commit 01a70d09db
4 changed files with 27 additions and 31 deletions

View File

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