Skip to content

Commit daae12e

Browse files
committed
fix(timeout): make sure to clear heap_pos after removing a timeout from the heap
1 parent 34de951 commit daae12e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/constance/src/kernel/timeout.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,9 @@ pub(super) fn handle_tick<System: Kernel>() {
697697
..
698698
} = *timeout;
699699

700+
debug_assert_eq!(timeout.heap_pos.load(Ordering::Relaxed), 0);
701+
timeout.heap_pos.store(HEAP_POS_NONE, Ordering::Relaxed);
702+
700703
g_timeout
701704
.heap
702705
.write(&mut *lock)

0 commit comments

Comments
 (0)