Wake up background polling thread when old_instant is 0

Co-authored-by: Ruihan Li <lrh2000@pku.edu.cn>
This commit is contained in:
Jianfeng Jiang
2024-05-13 06:17:20 +00:00
committed by Tate, Hongliang Tian
parent 328ce9e92c
commit 3981cd63cd
2 changed files with 16 additions and 19 deletions

View File

@ -177,7 +177,7 @@ impl IfaceCommon {
let new_instant = instant.total_millis() as u64;
self.next_poll_at_ms.store(new_instant, Ordering::Relaxed);
if new_instant < old_instant {
if old_instant == 0 || new_instant < old_instant {
self.polling_wait_queue.wake_all();
}
} else {