diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 56365f9b7..991c1fb0b 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); - match pinned.await { + let future = Box::pin(gw_ongoing_connection); + match futures::Future::poll(Pin::new(&future), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -382,8 +382,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); - match pinned.await { + let future = Box::pin(ongoing_connection); + match futures::Future::poll(Pin::new(&future), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) }