Remove unnecessary async marker for create_endpoint (#25290)

* Add metrics for open_uni

* Remove unnecessary async marker for create_endpoint

* Removed noisy metrics
This commit is contained in:
Lijun Wang 2022-05-19 01:17:29 -07:00 committed by GitHub
parent d38752e1e7
commit 2266dfc696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -84,7 +84,7 @@ impl QuicNewConnection {
crypto.enable_early_data = true;
let mut endpoint =
QuicNewConnection::create_endpoint(EndpointConfig::default(), client_socket).await;
QuicNewConnection::create_endpoint(EndpointConfig::default(), client_socket);
let mut config = ClientConfig::new(Arc::new(crypto));
let transport_config = Arc::get_mut(&mut config.transport).unwrap();
@ -113,9 +113,7 @@ impl QuicNewConnection {
})
}
// If this function becomes public, it should be changed to
// not expose details of the specific Quic implementation we're using
async fn create_endpoint(config: EndpointConfig, client_socket: UdpSocket) -> Endpoint {
fn create_endpoint(config: EndpointConfig, client_socket: UdpSocket) -> Endpoint {
quinn::Endpoint::new(config, None, client_socket).unwrap().0
}