Hacker News new | ask | show | jobs
by easrng 1592 days ago
Though in JS an EventSource does automatically try to reconnect once it notices the connection is dropped, unlike a WebSocket.
1 comments

It's not good enough in our experience, EventSource can still think it's connected when the server can no longer push data onto it. The periodic heartbeat to verify messages can still be sent on the connection is the only reliable way we've found to detect & autoretry failed connections.