Skip to content

Commit

Permalink
Do not make canceled_owned() context-aware
Browse files Browse the repository at this point in the history
  • Loading branch information
slowli committed Sep 28, 2023
1 parent e5685d3 commit c3bf0ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/libs/concurrency/src/ctx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ impl Ctx {

/// Awaits until the local context gets canceled. Unlike [`Self::canceled()`], the returned
/// future has a static lifetime.
pub fn canceled_owned(&self) -> CtxAware<impl Future<Output = ()>> {
pub fn canceled_owned(&self) -> impl Future<Output = ()> {
let canceled = self.0.canceled.clone();
CtxAware(async move { canceled.cancel_safe_recv().await })
async move { canceled.cancel_safe_recv().await }
}

/// Checks if the context is still active (i.e., not canceled).
Expand Down

0 comments on commit c3bf0ae

Please sign in to comment.