3 ms·
Though in JS an EventSource does automatically try to reconnect once it notices the connection is dropped, unlike a WebSocket.
by easrng 5y ago
Though in JS an EventSource does automatically try to reconnect once it notices the connection is dropped, unlike a WebSocket.
- mythz 5y agoIt'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.