mirror of
git://erdgeist.org/opentracker
synced 2025-01-14 00:40:09 +00:00
random
This commit is contained in:
parent
1d5f915940
commit
808e370566
@ -210,7 +210,7 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned long amount, char
|
|||||||
|
|
||||||
// In some rare occasions random gets the last peer a round to early
|
// In some rare occasions random gets the last peer a round to early
|
||||||
// correct that and return last peer twice
|
// correct that and return last peer twice
|
||||||
if( wert >= peer_count ) { wert--; pool_offset--; }
|
// if( wert >= peer_count ) { wert--; pool_offset--; }
|
||||||
|
|
||||||
while( pool_offset >= torrent->peer_list->peers[pool_index].size ) {
|
while( pool_offset >= torrent->peer_list->peers[pool_index].size ) {
|
||||||
pool_offset -= torrent->peer_list->peers[pool_index].size;
|
pool_offset -= torrent->peer_list->peers[pool_index].size;
|
||||||
|
Loading…
Reference in New Issue
Block a user