mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-19 01:36:08 +00:00
Forbid new outgoing connections on closed endpoints
This commit is contained in:
committed by
Dirkjan Ochtman
parent
9ce24f93e4
commit
040f6d7256
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user