More TCP-related fixes and tweaks to ping timing, resynchronize, and startup.

This commit is contained in:
Adam Ierymenko 2014-03-27 17:02:52 -07:00
parent 2ac56fd120
commit c231510f8b
5 changed files with 60 additions and 43 deletions

View file

@ -64,7 +64,7 @@ class RuntimeEnvironment
public:
RuntimeEnvironment() :
shutdownInProgress(false),
timeOfLastNetworkEnvironmentChange(0),
timeOfLastResynchronize(0),
timeOfLastPacketReceived(0),
log((Logger *)0),
prng((CMWC4096 *)0),
@ -91,7 +91,7 @@ public:
volatile bool shutdownInProgress;
// Time network environment (e.g. fingerprint) last changed -- used to determine online-ness
volatile uint64_t timeOfLastNetworkEnvironmentChange;
volatile uint64_t timeOfLastResynchronize;
// Time last packet was received -- from anywhere. This is updated in Peer::receive()
// via an ugly const_cast<>.