mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
Merge pull request #14215 from overleaf/jpa-slow-down-reconnecting
[web] slow down reconnecting to real-time on low-level errors GitOrigin-RevId: cc7aba1f8fbc0fceb5dc66145009ba28c6236648
This commit is contained in:
@@ -150,7 +150,11 @@ export default ConnectionManager = (function () {
|
||||
window.wsRetryHandshake &&
|
||||
connectionAttempt++ < window.wsRetryHandshake
|
||||
) {
|
||||
return setTimeout(() => this.ide.socket.socket.connect(), 100)
|
||||
return setTimeout(
|
||||
() => this.ide.socket.socket.connect(),
|
||||
// add jitter to spread reconnects
|
||||
connectionAttempt * (1 + Math.random()) * 1000
|
||||
)
|
||||
}
|
||||
this.updateConnectionManagerState('error')
|
||||
sl_console.log('socket.io error', err)
|
||||
|
||||
Reference in New Issue
Block a user