mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-16 18:10:40 -04:00
discovery: don't remove new added locations too soon
was: removed after 10 min. or less - when no connection is established now: removed after 1 day - when no connection is established
This commit is contained in:
parent
efadc7d2c6
commit
841299d077
3 changed files with 9 additions and 4 deletions
|
@ -64,8 +64,6 @@ const uint32_t MIN_TIME_BETWEEN_NET_RESET = 5;
|
|||
|
||||
const uint32_t PEER_IP_CONNECT_STATE_MAX_LIST_SIZE = 4;
|
||||
|
||||
#define VERY_OLD_PEER (90 * 24 * 3600) // 90 days.
|
||||
|
||||
/****
|
||||
* #define PEER_DEBUG 1
|
||||
***/
|
||||
|
@ -2751,7 +2749,7 @@ bool p3PeerMgrIMPL::removeUnusedLocations()
|
|||
std::map<RsPeerId, peerState>::iterator it;
|
||||
for(it = mFriendList.begin(); it != mFriendList.end(); ++it)
|
||||
{
|
||||
if (now - it->second.lastcontact > VERY_OLD_PEER)
|
||||
if (now - it->second.lastcontact > RS_PEER_OLD_PEER)
|
||||
{
|
||||
toRemove.push_back(it->first);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue