* [web] only flag errors originating from WebSocket connect as ws failure
* [web] slow down reconnecting when potentially offline
GitOrigin-RevId: 7c587d52dfe8092c45e2152f929e05e814db98f4
* [haproxy] add support for xhr-polling in real-time
* [web] try 3 WebSockets then fallback to xhr-polling when (re-)connecting
* [web] ensure old socket.io transport has been closed when reconnecting
* [web] close xhr-polling transport before leaving the page
This will de-register the client, leave the project and clean up the
connected clients tracking ASAP.
* [web] rename constant to avoid confusion
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
---------
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 55e500c341145947e5589875438fc796394b6ae4
* [web] add external 15s heartbeat to socket.io connection
* [web] extend debugging context for client errors
- include performance.now() timestamp for correlating other timings
- include connectionState, especially for new externalHeartbeat detail
- include spellCheckLanguage to check on client-side spelling impact
* [web] remove unnecessary hook dependency
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
* Refactor externalHeartbeat
* Add connectionManager to context
* Clear the interval earlier, and on connect
* [web] refactor handling of socket debugging info
* [web] add split-test for external socket heartbeat
* [web] fully remove connectionManager from connection context
---------
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: fbebe64f8aa207eb4fd4a8f27d522d1cac35f9d4