fixed bug in grouter which caused sending of messages to some offline peers, hence wasting some routes, and causing " p3ServiceServer::sendItem() Fails Filtering for packet id=2001810" messages.

This commit is contained in:
csoler 2016-04-05 18:09:02 -04:00
parent 7817a542f2
commit f26348b710

View File

@ -1144,6 +1144,12 @@ void p3GRouter::locked_collectAvailableFriends(const GRouterKeyId& gxs_id,const
{
#ifdef GROUTER_DEBUG
std::cerr << " removing " << tmp_peers[i] << " which is an incoming route" << std::endl;
#endif
}
else if(online_ids.find(tmp_peers[i]) == online_ids.end())
{
#ifdef GROUTER_DEBUG
std::cerr << " removing " << tmp_peers[i] << " because it is offline now!" << std::endl;
#endif
}
else if(probas[i] < RS_GROUTER_PROBABILITY_THRESHOLD_BEST_PEERS_SELECT*max_probability)