Fix TCP connection accumulation problem, still having issues with TCP tunneling.

This commit is contained in:
Adam Ierymenko 2014-03-26 17:59:45 -07:00
parent e6b23059ac
commit 2ac56fd120
7 changed files with 44 additions and 44 deletions

View file

@ -65,6 +65,7 @@ public:
RuntimeEnvironment() :
shutdownInProgress(false),
timeOfLastNetworkEnvironmentChange(0),
timeOfLastPacketReceived(0),
log((Logger *)0),
prng((CMWC4096 *)0),
mc((Multicaster *)0),
@ -92,6 +93,10 @@ public:
// Time network environment (e.g. fingerprint) last changed -- used to determine online-ness
volatile uint64_t timeOfLastNetworkEnvironmentChange;
// Time last packet was received -- from anywhere. This is updated in Peer::receive()
// via an ugly const_cast<>.
volatile uint64_t timeOfLastPacketReceived;
/*
* Order matters a bit here. These are constructed in this order
* and then deleted in the opposite order on Node exit. The order ensures