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:
trim21
2026-06-10 02:15:32 +08:00
committed by Jari Sundell
parent c63db9cf97
commit 5b2e202452
+6 -2
View File
@@ -80,10 +80,14 @@ Manager::schedule_update(std::chrono::microseconds min_interval) {
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;
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));
}
}