mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(libT) when picking peers to connect to, all other things being equal, pick peers from more reliable sources
This commit is contained in:
@@ -2124,6 +2124,11 @@ compareCandidates( const void * va,
|
||||
if( a->time != b->time )
|
||||
return a->time < b->time ? -1 : 1;
|
||||
|
||||
/* all other things being equal, prefer peers whose
|
||||
* information comes from a more reliable source */
|
||||
if( a->from != b->from )
|
||||
return a->from < b->from ? -1 : 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user