diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index b37f9b53f..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match Box::pin(gw_ongoing_connection).as_mut().await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match Box::pin(ongoing_connection).as_mut().await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) }