Merge pull request #15747 from overleaf/td-ide-page-on-online

React IDE page: prevent error from connection manager when user comes online

GitOrigin-RevId: 8548b8db4cfb32598916eb423af737b36b4eadf5
This commit is contained in:
Tim Down 2023-11-13 10:54:56 +00:00 committed by Copybot
parent f781e00f10
commit 5ddcdfbe2b

View file

@ -50,7 +50,7 @@ export class ConnectionManager extends Emitter<Events> {
this.disconnectIfIdleSince(DISCONNECT_AFTER_MS) this.disconnectIfIdleSince(DISCONNECT_AFTER_MS)
}, ONE_HOUR_IN_MS) }, ONE_HOUR_IN_MS)
window.addEventListener('online', this.onOnline) window.addEventListener('online', () => this.onOnline())
const socket = SocketIoShim.connect('', { const socket = SocketIoShim.connect('', {
'auto connect': false, 'auto connect': false,