mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-25 04:35:17 +00:00
Ensure Connecting::handshake_data completes on connection errors
This commit is contained in:
committed by
Dirkjan Ochtman
parent
c8736e869b
commit
459f56973c
@@ -997,6 +997,9 @@ where
|
||||
/// Used to wake up all blocked futures when the connection becomes closed for any reason
|
||||
fn terminate(&mut self, reason: ConnectionError) {
|
||||
self.error = Some(reason.clone());
|
||||
if let Some(x) = self.on_handshake_data.take() {
|
||||
let _ = x.send(());
|
||||
}
|
||||
for (_, writer) in self.blocked_writers.drain() {
|
||||
writer.wake()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user