Skip to content

Commit

Permalink
fix: Remove redundant pinning of boxed futures in connection handler
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 26, 2024
1 parent 6016c5c commit 03a1c57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/src/transport/connection_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl<S: Socket> UdpPacketsListener<S> {
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))
}
Expand Down Expand Up @@ -380,7 +380,7 @@ impl<S: Socket> UdpPacketsListener<S> {
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))
}
Expand Down

0 comments on commit 03a1c57

Please sign in to comment.