Skip to content

Commit

Permalink
fix: Pin dynamic futures to resolve Unpin trait compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 26, 2024
1 parent 03a1c57 commit c16decd
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 gw_ongoing_connection.await {
match Box::pin(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 ongoing_connection.await {
match Box::pin(ongoing_connection).await {
Ok(result) => Ok(result),
Err(error) => Err((error, remote_addr))
}
Expand Down

0 comments on commit c16decd

Please sign in to comment.