As certificate cleaning is very much more brutal now... (strip all SSL certs not connected to recently).

I've reduced the frequency, and increased the age for removal.
 * Cleared every 31 minutes, first cleaning after 1 hour.
 * old peer is no contact for 90 days.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4547 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-08-08 12:02:17 +00:00
parent 8688c65f4c
commit ce0a36607d

View File

@ -64,6 +64,8 @@ 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
***/
@ -183,9 +185,8 @@ void p3PeerMgrIMPL::setOwnVisState(uint32_t visState)
void p3PeerMgrIMPL::tick()
{
static time_t last_friends_check = time(NULL) ;
//static const time_t INTERVAL_BETWEEN_LOCATION_CLEANING = 600 ; // Remove unused locations every 10 minutes.
static const time_t INTERVAL_BETWEEN_LOCATION_CLEANING = 480 ; // Switch to 8 minutes -> see if it changes
static const time_t INTERVAL_BETWEEN_LOCATION_CLEANING = 1860 ; // Remove unused locations every 31 minutes.
static time_t last_friends_check = time(NULL) + INTERVAL_BETWEEN_LOCATION_CLEANING; // first cleaning after 1 hour.
time_t now = time(NULL) ;
@ -1728,7 +1729,6 @@ bool isDummyFriend(std::string id)
return ret;
}
#define VERY_OLD_PEER (30 * 24 * 3600) // 30 days.
bool p3PeerMgrIMPL::removeUnusedLocations()
{