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
1 changed files with 0 additions and 8 deletions

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())