Forbid new outgoing connections on closed endpoints

This commit is contained in:
Benjamin Saunders
2024-04-20 10:01:42 -07:00
committed by Dirkjan Ochtman
parent 9ce24f93e4
commit 040f6d7256
+1 -1
View File
@@ -180,7 +180,7 @@ impl Endpoint {
server_name: &str,
) -> Result<Connecting, ConnectError> {
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 {