Closed kouta-kun closed 1 year ago
If you return Pending
, you need to use the contexts waker to signal when it should be polled again.
The documentation for Future::poll
may help here: https://doc.rust-lang.org/std/future/trait.Future.html#tymethod.poll
Thanks!
Version
Platform
Linux arch-kouta 6.5.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 23 Sep 2023 22:55:13 +0000 x86_64 GNU/Linux
Description As the title implies, warp::sse::reply seems to give up on streams that return a Pending at some point, minimal repro:
I would expect
poll_fn
's parameter to be executed until count reaches 5 and it can start getting responses, however, I get a single output (as if it's being called only once):The connection does remain, which makes me believe it's not being cancelled but just not checked again after getting a Pending result. If instead I replace the condition by true, I do in fact get infinite executions and message streams.