Skip to content

Commit

Permalink
Revert "Revert upsert for download wrapper"
Browse files Browse the repository at this point in the history
This reverts commit 7487762.
  • Loading branch information
stickz committed Sep 15, 2024
1 parent 7487762 commit b8dc70f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libtorrent/src/download/download_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,8 @@ DownloadWrapper::receive_hash_done(ChunkHandle handle, const char* hash) {
finished_download();

} else if (was_partial && data()->wanted_chunks() == 0) {
priority_queue_erase(&taskScheduler, &m_main->delay_partially_done());
priority_queue_erase(&taskScheduler, &m_main->delay_partially_restarted());
priority_queue_insert(&taskScheduler, &m_main->delay_partially_done(), cachedTime);
priority_queue_upsert(&taskScheduler, &m_main->delay_partially_done(), cachedTime);
}

if (!m_main->have_queue()->empty() && m_main->have_queue()->front().first >= cachedTime)
Expand Down

0 comments on commit b8dc70f

Please sign in to comment.