diff --git a/ChangeLog b/ChangeLog index 70329b552..3f4e5d323 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ * don't attempt to create empty files on startup, if they already exist * fix force-recheck issue (new files would not be picked up) * fix inconsistency in file_priorities and override_resume_data behavior + * fix paused torrents not generating a state update when their ul/dl rate + transitions to zero 1.1.4 release diff --git a/src/torrent.cpp b/src/torrent.cpp index 63f8bec49..2319557f7 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -10402,11 +10402,13 @@ namespace { if (is_paused() && !m_graceful_pause_mode) { // let the stats fade out to 0 - m_stat.second_tick(tick_interval_ms); - // if the rate is 0, there's no update because of network transfers + // check the rate before ticking the stats so that the last update is sent + // with the rate equal to zero if (m_stat.low_pass_upload_rate() > 0 || m_stat.low_pass_download_rate() > 0) state_updated(); - else + m_stat.second_tick(tick_interval_ms); + // if the rate is 0, there's no update because of network transfers + if (!(m_stat.low_pass_upload_rate() > 0 || m_stat.low_pass_download_rate() > 0)) update_want_tick(); return;