fix idle interrupts

This commit is contained in:
dignifiedquire
2020-03-23 00:09:22 +01:00
parent 0ead27a05b
commit 01b88f876e
3 changed files with 32 additions and 5 deletions

View File

@@ -366,7 +366,8 @@ impl ConnectionState {
}
async fn interrupt(&self) {
self.idle_interrupt_sender.send(()).await;
// Use try_send to avoid blocking on interrupts.
self.idle_interrupt_sender.try_send(()).ok();
}
}