Skip to content

Commit

Permalink
Remove redundant/obsolete Endpoint::reject_new_connections
Browse files Browse the repository at this point in the history
This was previously used by the `quinn` layer to stop accepting
connections when the `Incoming` stream was dropped. That stream has
since been replaced by an async function. Users who still want this
can use set_server_config directly.
  • Loading branch information
Ralith committed Jun 13, 2023
1 parent 4b309cd commit 1d8ba9b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions quinn-proto/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,6 @@ impl Endpoint {
})
}

/// Unconditionally reject future incoming connections
pub fn reject_new_connections(&mut self) {
if let Some(config) = self.server_config.as_mut() {
Arc::make_mut(config).concurrent_connections(0);
}
}

/// Access the configuration used by this endpoint
pub fn config(&self) -> &EndpointConfig {
&self.config
Expand Down

0 comments on commit 1d8ba9b

Please sign in to comment.