augmented the heartbeat parameters, to reduce the stress on connections. Seems to help a lot when the traffic is high.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3047 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-06-01 20:33:27 +00:00
parent 626947a7a1
commit 860f3a0568
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ int pqiperson::tick()
//if lastHeartbeatReceived is 0, it might be not activated so don't do a net reset.
if (active &&
lastHeartbeatReceived != 0 &&
(time(NULL) - lastHeartbeatReceived) > HEARTBEAT_REPEAT_TIME * 3) {
(time(NULL) - lastHeartbeatReceived) > HEARTBEAT_REPEAT_TIME * 10) {
pqioutput(PQL_WARNING, pqipersonzone, "pqiperson::tick() No heartbeat from the peer, assume connection is dead.");
this->reset();
}

View File

@ -41,7 +41,7 @@ static const int CONNECT_UNREACHABLE = 3;
static const int CONNECT_FIREWALLED = 4;
static const int CONNECT_FAILED = 5;
static const int HEARTBEAT_REPEAT_TIME = 6;
static const int HEARTBEAT_REPEAT_TIME = 10;
#include "pqi/pqistreamer.h"