Skip to content

Commit

Permalink
chore(broadcast): use spawn macro for top level task
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-wright committed May 27, 2024
1 parent 6246382 commit 5ca1bc7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/broadcast/src/ev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,14 @@ impl<C: Collection> Context<LightningBackend<C>> {
where
Self: Send,
{
tokio::spawn(async move {
self.run(waiter).await;
});
let panic_waiter = waiter.clone();
spawn!(
async move {
self.run(waiter).await;
},
"BROADCAST",
crucial(panic_waiter)
);
}
}

Expand Down

0 comments on commit 5ca1bc7

Please sign in to comment.