mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-07 00:00:09 +02:00
Fix RefCell borrow_mut error on firing timeouts
The scope was a little longer than intended!
This commit is contained in:
+5
-1
@@ -237,7 +237,11 @@ impl Loop {
|
||||
}
|
||||
|
||||
fn consume_timeouts(&mut self, now: Instant) {
|
||||
while let Some(idx) = self.timer_wheel.borrow_mut().poll(now) {
|
||||
loop {
|
||||
let idx = match self.timer_wheel.borrow_mut().poll(now) {
|
||||
Some(idx) => idx,
|
||||
None => break,
|
||||
};
|
||||
trace!("firing timeout: {}", idx);
|
||||
let handle = self.timeouts.borrow_mut()[idx].1.fire();
|
||||
if let Some(handle) = handle {
|
||||
|
||||
Reference in New Issue
Block a user