mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05: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:
parent
2e944a6230
commit
d3c7ea9d32
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue