From ad5d09045cc21e7c7b00e8425e1bf1779ae16102 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Thu, 23 Feb 2023 20:56:03 +0700 Subject: [PATCH] Fix issue with `BcPayloadStream` not waking for next poll --- crates/core/src/bc_protocol/connection/bcsub.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/core/src/bc_protocol/connection/bcsub.rs b/crates/core/src/bc_protocol/connection/bcsub.rs index 7c95cd1..279038e 100644 --- a/crates/core/src/bc_protocol/connection/bcsub.rs +++ b/crates/core/src/bc_protocol/connection/bcsub.rs @@ -60,7 +60,10 @@ impl<'a> Stream for BcPayloadStream<'a> { }), .. } => Poll::Ready(Some(Ok(data))), - _ => Poll::Pending, + _ => { + cx.waker().wake_by_ref(); // Make it wake in next frame for another attempt at rx.poll_next(cx) + Poll::Pending + } } } Poll::Ready(None) => Poll::Ready(None),