mirror of
https://github.com/transmission/transmission
synced 2025-02-13 09:54:44 +00:00
(trunk libT) #3329 "connection problems when downloading" -- when deciding which peer to connect to, take download/seed status into account
This commit is contained in:
parent
e70ed9a2e8
commit
acd0e77901
1 changed files with 4 additions and 0 deletions
|
@ -3393,6 +3393,10 @@ getPeerCandidateScore( const tr_torrent * tor, const struct peer_atom * atom, ui
|
|||
i = torrentWasRecentlyStarted( tor ) ? 0 : 1;
|
||||
score = addValToKey( score, 1, i );
|
||||
|
||||
/* prefer torrents we're downloading with */
|
||||
i = tr_torrentIsSeed( tor ) ? 1 : 0;
|
||||
score = addValToKey( score, 1, i );
|
||||
|
||||
/* prefer peers that we might have a chance of uploading to...
|
||||
so lower seed probability is better */
|
||||
if( atom->seedProbability == 100 ) i = 101;
|
||||
|
|
Loading…
Reference in a new issue