Skip to content

Commit

Permalink
Remove irc stream task from iced stream which has backpressure
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Sep 12, 2024
1 parent 5dce561 commit b816999
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ pub fn run(
) -> impl futures::Stream<Item = Update> {
let (sender, receiver) = mpsc::unbounded();

let runner = stream::once(_run(server, proxy, sender)).map(|_| unreachable!());
// Spawn to unblock backend from iced stream which has backpressure
let runner = stream::once(async { tokio::spawn(_run(server, proxy, sender)).await })
.map(|_| unreachable!());

stream::select(receiver, runner)
}
Expand Down

0 comments on commit b816999

Please sign in to comment.