mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
Don't limit the number of torrents that can be announced to the tracker/dht/lsd. Closes #3473.
This commit is contained in:
parent
50822a7476
commit
4642a35de7
1 changed files with 8 additions and 15 deletions
|
@ -401,10 +401,10 @@ void Session::setSessionSettings()
|
|||
sessionSettings.active_downloads = -1;
|
||||
sessionSettings.active_seeds = -1;
|
||||
sessionSettings.active_limit = -1;
|
||||
}
|
||||
sessionSettings.active_tracker_limit = -1;
|
||||
sessionSettings.active_dht_limit = -1;
|
||||
sessionSettings.active_lsd_limit = -1;
|
||||
}
|
||||
|
||||
// Outgoing ports
|
||||
sessionSettings.outgoing_ports = std::make_pair(pref->outgoingPortsMin(), pref->outgoingPortsMax());
|
||||
|
@ -461,23 +461,16 @@ void Session::adjustLimits(libt::session_settings &sessionSettings)
|
|||
//Internally increase the queue limits to ensure that the magnet is started
|
||||
int max_downloading = pref->getMaxActiveDownloads();
|
||||
int max_active = pref->getMaxActiveTorrents();
|
||||
|
||||
if (max_downloading > -1)
|
||||
sessionSettings.active_downloads = max_downloading + m_extraLimit;
|
||||
else
|
||||
sessionSettings.active_downloads = max_downloading;
|
||||
if (max_active > -1) {
|
||||
int limit = max_active + m_extraLimit;
|
||||
sessionSettings.active_limit = limit;
|
||||
sessionSettings.active_tracker_limit = limit;
|
||||
sessionSettings.active_dht_limit = limit;
|
||||
sessionSettings.active_lsd_limit = limit;
|
||||
}
|
||||
else {
|
||||
|
||||
if (max_active > -1)
|
||||
sessionSettings.active_limit = max_active + m_extraLimit;
|
||||
else
|
||||
sessionSettings.active_limit = max_active;
|
||||
sessionSettings.active_tracker_limit = max_active;
|
||||
sessionSettings.active_dht_limit = max_active;
|
||||
sessionSettings.active_lsd_limit = max_active;
|
||||
}
|
||||
}
|
||||
|
||||
// Set BitTorrent session configuration
|
||||
|
|
Loading…
Reference in a new issue