1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

refactor: remove redundant seed limit check (#5770)

This commit is contained in:
tearfur 2023-07-12 21:27:06 +08:00 committed by GitHub
parent f036b7c3bf
commit 0350b62248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1886,7 +1886,6 @@ void tr_torrent::recheck_completeness()
if (new_completeness != completeness) if (new_completeness != completeness)
{ {
bool const recent_change = downloadedCur != 0; bool const recent_change = downloadedCur != 0;
bool const was_leeching = !this->is_done();
bool const was_running = is_running(); bool const was_running = is_running();
if (recent_change) if (recent_change)
@ -1921,13 +1920,6 @@ void tr_torrent::recheck_completeness()
this->session->onTorrentCompletenessChanged(this, completeness, was_running); this->session->onTorrentCompletenessChanged(this, completeness, was_running);
if (this->is_done() && was_leeching && was_running)
{
/* if completeness was TR_LEECH, the seed limit check
will have been skipped in bandwidthPulse */
tr_torrentCheckSeedLimit(this);
}
this->set_dirty(); this->set_dirty();
if (this->is_done()) if (this->is_done())