mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-27 18:12:21 -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
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
|
||||
#include "services/p3discovery2.h"
|
||||
#include "pqi/p3peermgr.h"
|
||||
#include "util/rsversioninfo.h"
|
||||
|
||||
#include "retroshare/rsiface.h"
|
||||
|
@ -930,7 +931,10 @@ void p3discovery2::processContactInfo(const SSLID &fromId, const RsDiscContactIt
|
|||
// We pass RS_NODE_PERM_ALL because the PGP id is already a friend, so we should keep the existing
|
||||
// permission flags. Therefore the mask needs to be 0xffff.
|
||||
|
||||
mPeerMgr->addFriend(item->sslId, item->pgpId, item->netMode, RS_VS_DISC_OFF, RS_VS_DHT_FULL,(time_t)0,RS_NODE_PERM_ALL);
|
||||
// set last seen to RS_PEER_OLD_PEER minus 1 day so that the DHT has a fair chance to establish a connection
|
||||
// before the location gets automatically removed again
|
||||
|
||||
mPeerMgr->addFriend(item->sslId, item->pgpId, item->netMode, RS_VS_DISC_OFF, RS_VS_DHT_FULL, time(NULL) - RS_PEER_OLD_PEER + (24 * 3600), RS_NODE_PERM_ALL);
|
||||
updatePeerAddresses(item);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue