mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
fix: scheduler front()->time() -> front()->time after SchedulerHandle change
SchedulerHandle::time is now a data member instead of a method, so front()->time() must be front()->time (no parentheses).
This commit is contained in:
@@ -80,10 +80,14 @@ Manager::schedule_update(std::chrono::microseconds min_interval) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_task_update.is_scheduled() && m_task_update.time() <= m_scheduler.front()->time())
|
auto cached = torrent::this_thread::cached_time();
|
||||||
|
m_scheduler.external_set_cached_time(cached);
|
||||||
|
auto next = cached + m_scheduler.next_timeout(cached);
|
||||||
|
|
||||||
|
if (m_task_update.is_scheduled() && m_task_update.time_or_zero() <= next)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
torrent::this_thread::scheduler()->update_wait_until(&m_task_update, std::max(m_scheduler.front()->time(), m_time_last_update + min_interval));
|
torrent::this_thread::scheduler()->update_wait_until(&m_task_update, std::max(next, m_time_last_update + min_interval));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user