From 040f6d7256ce63aa8a2f3756830dc4e7103a31e9 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sat, 20 Apr 2024 10:01:42 -0700 Subject: [PATCH] Forbid new outgoing connections on closed endpoints --- quinn/src/endpoint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quinn/src/endpoint.rs b/quinn/src/endpoint.rs index 0e4aeeb89..6543056bb 100644 --- a/quinn/src/endpoint.rs +++ b/quinn/src/endpoint.rs @@ -180,7 +180,7 @@ impl Endpoint { server_name: &str, ) -> Result { let mut endpoint = self.inner.state.lock().unwrap(); - if endpoint.driver_lost { + if endpoint.driver_lost || endpoint.connections.close.is_some() { return Err(ConnectError::EndpointStopping); } if addr.is_ipv6() && !endpoint.ipv6 {