mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed bug in global router making the routing matrix too sparse
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7623 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
85fce2f2dc
commit
d44eb370e4
@ -53,10 +53,10 @@ bool GRouterMatrix::addRoutingClue(const GRouterKeyId& key_id,const RsPeerId& so
|
||||
// 1 - a user restarts RS very often => keys get republished for some reason
|
||||
// 2 - a user intentionnaly floods a key
|
||||
//
|
||||
if(!lst.empty() && lst.front().time_stamp + RS_GROUTER_MATRIX_MIN_TIME_BETWEEN_HITS > now)
|
||||
if(!lst.empty() && lst.front().friend_id == fid && lst.front().time_stamp + RS_GROUTER_MATRIX_MIN_TIME_BETWEEN_HITS > now)
|
||||
{
|
||||
std::cerr << "GRouterMatrix::addRoutingClue(): too clues for key " << key_id.toStdString() << " in a small interval of " << now - lst.front().time_stamp << " seconds. Flooding?" << std::endl;
|
||||
return false ;
|
||||
std::cerr << "GRouterMatrix::addRoutingClue(): too many clues for key " << key_id.toStdString() << " from friend " << source_friend << " in a small interval of " << now - lst.front().time_stamp << " seconds. Flooding?" << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
lst.push_front(rc) ; // create it if necessary
|
||||
|
Loading…
Reference in New Issue
Block a user