prefer purging peer entries that are not connectable

This commit is contained in:
Arvid Norberg 2011-04-25 00:13:30 +00:00
parent 6e7de92859
commit 1deeb98898
1 changed files with 3 additions and 0 deletions

View File

@ -1631,6 +1631,9 @@ namespace libtorrent
if (lhs_resume_data_source != rhs_resume_data_source)
return lhs_resume_data_source > rhs_resume_data_source;
if (lhs.connectable != rhs.connectable)
return lhs.connectable < rhs.connectable;
// prefer peers with higher failcount
return lhs.failcount > rhs.failcount;
}