Don't increase limits when prefetching metadata for added magnets

Adjusting limits was made based on the belief that "forced" torrents (internally used for prefetching metadata)
are still under limits, but ignore only the queue. This is not really the case. "Forced" torrents ignore the limits
like "maximum active torrents/downloads", so adjusting limits is not required, and what's more, it really causes the
problem of unexpectedly activated previously queued torrents when adding some magnet using "Add new torrent" dialog.

PR #18503.
Fixes #18490.
This commit is contained in:
Vladimir Golovnev 2023-02-02 06:16:32 +03:00 committed by GitHub
parent d256db5072
commit 09e58df03f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 37 deletions

View file

@ -492,9 +492,7 @@ namespace BitTorrent
lt::settings_pack loadLTSettings() const;
void applyNetworkInterfacesSettings(lt::settings_pack &settingsPack) const;
void configurePeerClasses();
int adjustLimit(int limit) const;
void initMetrics();
void adjustLimits();
void applyBandwidthLimits();
void processBannedIPs(lt::ip_filter &filter);
QStringList getListeningIPs() const;
@ -686,7 +684,6 @@ namespace BitTorrent
const bool m_wasPexEnabled = m_isPeXEnabled;
int m_numResumeData = 0;
int m_extraLimit = 0;
QVector<TrackerEntry> m_additionalTrackerList;
QVector<QRegularExpression> m_excludedFileNamesRegExpList;