mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 00:31:32 -04:00
Removed Lots of Debug, and fixed a couple of bugs.
* Increased Timeout Periods for UDP connections - this was stopping half of them from succeeding. * The other bug (Heartbeat / stream issues) has not been solved. * Fixed up initialisation of p3BitDht data. * add DropPeers() as NON-ACTIVE (this allows peers which aren't VISIBLE to still try and connect) * export AddFriends/FOF/Others to LinkMgr to allow further SSL IDs to be added to p3BitDht. * Export UDP Addresses to DhtWindow. * switch off lots of debugging. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4469 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e7049cc483
commit
cc9df9a80f
13 changed files with 370 additions and 190 deletions
|
@ -102,7 +102,8 @@ int pqiperson::status()
|
|||
|
||||
int pqiperson::receiveHeartbeat()
|
||||
{
|
||||
pqioutput(PQL_DEBUG_ALERT, pqipersonzone, "pqiperson::receiveHeartbeat() from peer : " + PeerId());
|
||||
//pqioutput(PQL_DEBUG_ALERT, pqipersonzone, "pqiperson::receiveHeartbeat() from peer : " + PeerId());
|
||||
pqioutput(PQL_WARNING, pqipersonzone, "pqiperson::receiveHeartbeat() from peer : " + PeerId());
|
||||
lastHeartbeatReceived = time(NULL);
|
||||
|
||||
return true ;
|
||||
|
@ -112,11 +113,14 @@ int pqiperson::receiveHeartbeat()
|
|||
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 * 5) {
|
||||
pqioutput(PQL_WARNING, pqipersonzone, "pqiperson::tick() No heartbeat from the peer, assume connection is dead.");
|
||||
this->reset();
|
||||
if (active && (lastHeartbeatReceived != 0) &&
|
||||
(time(NULL) - lastHeartbeatReceived) > HEARTBEAT_REPEAT_TIME * 5)
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "pqiperson::tick() No heartbeat from the peer, assume connection is dead. LastHeartbeat was: ";
|
||||
out << time(NULL) - lastHeartbeatReceived << " secs ago";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out.str());
|
||||
this->reset();
|
||||
}
|
||||
|
||||
int activeTick = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue