mirror of
https://github.com/transmission/transmission
synced 2024-12-28 02:27:41 +00:00
perf: check torrrent seed ratio less frequently (#3747)
This commit is contained in:
parent
b01eebdaf4
commit
6d721fe32f
1 changed files with 9 additions and 8 deletions
|
@ -2273,15 +2273,19 @@ void tr_peerMgr::rechokePulse() const
|
|||
|
||||
for (auto* const tor : session->torrents())
|
||||
{
|
||||
if (!tor->isRunning)
|
||||
if (tor->isRunning)
|
||||
{
|
||||
continue;
|
||||
// possibly stop torrents that have seeded enough
|
||||
tr_torrentCheckSeedLimit(tor);
|
||||
}
|
||||
|
||||
if (auto* const swarm = tor->swarm; swarm->stats.peer_count > 0)
|
||||
if (tor->isRunning)
|
||||
{
|
||||
rechokeUploads(swarm, now);
|
||||
rechokeDownloads(swarm);
|
||||
if (auto* const swarm = tor->swarm; swarm->stats.peer_count > 0)
|
||||
{
|
||||
rechokeUploads(swarm, now);
|
||||
rechokeDownloads(swarm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2564,9 +2568,6 @@ void tr_peerMgr::bandwidthPulse()
|
|||
/* torrent upkeep */
|
||||
for (auto* const tor : session->torrents())
|
||||
{
|
||||
/* possibly stop torrents that have seeded enough */
|
||||
tr_torrentCheckSeedLimit(tor);
|
||||
|
||||
/* run the completeness check for any torrents that need it */
|
||||
if (tor->swarm->needs_completeness_check)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue