DEV Community

Discussion on: Server Sent Events are still not production ready after a decade. A lesson for me, a warning for you!

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

Yes we still do that. We have a fall back to Long Polling with a pretty simple layer over it. If we don't get messages from SSE in response to an initial "ping" then we have a layer that basically flushes the stream every time (with a small debounce delay) and reopens it. We send a command to the server that says "treat" this stream as always close and reopen. Closing the stream does cause the proxies to forward on all of the data.