Answer the question
In order to leave comments, you need to log in
ASP.NET SSE the first event is skipped, followed by a delay. What to do?
I use the PushStreamContent class on ASP.NET. When I need to send an event, I call WriteLine on the StreamWriter (AutoFlush=true), which wraps the Stream that comes when the client connects. But the first event sent doesn't arrive on the client. When looking at Network in Chrome dev tools, the status of the Get request (which is used to connect) changes from Waiting to Content download. Further events go normally (the first time for the second time, the second for the third, etc.)
Even if the first event comes, and this also happens, one way or another some will be skipped in this way, or 2 will come right away
. What is the reason and how can solve it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question