Skip to content

Commit

Permalink
Forbid new outgoing connections on closed endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith authored and djc committed Apr 22, 2024
1 parent 9ce24f9 commit 040f6d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quinn/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 040f6d7

Please sign in to comment.