Server side events buffered until connection close? #2891
Unanswered
ericaltendorf
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Are you maybe applying a compression middleware? ISTR some people had issues with compression buffering SSE events. I also rememer some fixes landing in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I have an SSE handler that looks something like:
I can verify the tx.send() messages are being added to the Sender on schedule, but on the client side (ie browser) the SSE events are not received until the connection is closed. It's like they're being buffered either in the mpsc channel or the ReceiverStream, but I can't figure out which, or how to flush either one.
I'm accessing via localhost so it's not a CDN issue, athough I don't know if there's some caching problem with my headers (I couldn't figure out the canonical way to disable caching, I thought there'd be some middleware helper functions, but I couldn't find any).
axum version
0.7.4
Beta Was this translation helpful? Give feedback.
All reactions