Skip to content

Commit

Permalink
Make Hyper work with unsend futures
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Jan 12, 2024
1 parent 0b194b2 commit 097663d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libsignal-service-hyper/src/push_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,11 @@ impl PushService for HyperPushService {
.await?;
let (ws, task) =
SignalWebSocket::from_socket(ws, stream, keepalive_path.to_owned());
tokio::task::spawn(task.instrument(span));
let task = task.instrument(span);
#[cfg(feature = "unsend-futures")]
tokio::task::spawn_local(task);
#[cfg(not(feature = "unsend-futures"))]
tokio::task::spawn(task);
Ok(ws)
}
}
Expand Down

0 comments on commit 097663d

Please sign in to comment.