From eddc99c5bd6702df00db3de1ed84f630d62c2161 Mon Sep 17 00:00:00 2001 From: Michel Meyer Date: Wed, 23 Sep 2020 15:09:07 +0700 Subject: [PATCH] Don't panic when trying to close a connection in "Connecting" state --- src/connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.rs b/src/connection.rs index b639695..251ce7a 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -1134,7 +1134,7 @@ where // We are initiating a closing handshake. Open => self.state = AwaitingClose, Connecting(_, _) => { - debug_assert!(false, "Attempted to close connection while not yet open.") + error!("Attempted to close connection while not yet open.") } }