forward port auto-manage fix from RC_1_0
This commit is contained in:
parent
2715ae475c
commit
cf15453388
|
@ -74,6 +74,7 @@
|
|||
* added support for hashing pieces in multiple threads
|
||||
|
||||
|
||||
* fix auto-manage bug with announce to tracker/lsd/dht limits
|
||||
* improve DHT routing table to not create an unbalanced tree
|
||||
* fix bug in uTP that would cause any connection taking more than one second
|
||||
to connect be timed out (introduced in the vulnerability path)
|
||||
|
|
|
@ -3577,15 +3577,12 @@ retry:
|
|||
|
||||
TORRENT_ASSERT(t->state() != torrent_status::checking_files);
|
||||
|
||||
--dht_limit;
|
||||
--lsd_limit;
|
||||
--tracker_limit;
|
||||
t->set_announce_to_dht(dht_limit >= 0);
|
||||
t->set_announce_to_trackers(tracker_limit >= 0);
|
||||
t->set_announce_to_lsd(lsd_limit >= 0);
|
||||
|
||||
if (type_limit > 0 && hard_limit > 0)
|
||||
{
|
||||
t->set_announce_to_dht(--dht_limit >= 0);
|
||||
t->set_announce_to_trackers(--tracker_limit >= 0);
|
||||
t->set_announce_to_lsd(--lsd_limit >= 0);
|
||||
|
||||
--hard_limit;
|
||||
--type_limit;
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
|
@ -3602,6 +3599,9 @@ retry:
|
|||
#endif
|
||||
// use graceful pause for auto-managed torrents
|
||||
t->set_allow_peers(false, true);
|
||||
t->set_announce_to_dht(false);
|
||||
t->set_announce_to_trackers(false);
|
||||
t->set_announce_to_lsd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue