mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #17863 from overleaf/ar-set-socket-disconnect-timeout-to-match-wire-value
Set socket disconnect timeout to match wire value GitOrigin-RevId: b3bfc460090b872500b55b0d5e2167b828ef31f4
This commit is contained in:
parent
d35204033f
commit
6100954635
2 changed files with 4 additions and 2 deletions
|
@ -219,13 +219,15 @@ export class ConnectionManager extends EventTarget {
|
||||||
clearInterval(this.idleDisconnectInterval)
|
clearInterval(this.idleDisconnectInterval)
|
||||||
clearTimeout(this.reconnectCountdownInterval)
|
clearTimeout(this.reconnectCountdownInterval)
|
||||||
window.removeEventListener('online', this.onOnline)
|
window.removeEventListener('online', this.onOnline)
|
||||||
|
|
||||||
|
window.setTimeout(() => this.disconnect(), 1000 * delay)
|
||||||
|
|
||||||
this.changeState({
|
this.changeState({
|
||||||
...this.state,
|
...this.state,
|
||||||
forceDisconnected: true,
|
forceDisconnected: true,
|
||||||
forcedDisconnectDelay: delay,
|
forcedDisconnectDelay: delay,
|
||||||
error,
|
error,
|
||||||
})
|
})
|
||||||
setTimeout(() => this.disconnect(), 1000)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private onJoinProjectResponse({
|
private onJoinProjectResponse({
|
||||||
|
|
|
@ -253,7 +253,7 @@ export default ConnectionManager = (function () {
|
||||||
})
|
})
|
||||||
// flush changes before disconnecting
|
// flush changes before disconnecting
|
||||||
this.ide.$scope.$broadcast('flush-changes')
|
this.ide.$scope.$broadcast('flush-changes')
|
||||||
setTimeout(() => this.ide.socket.disconnect(), 1000)
|
window.setTimeout(() => this.ide.socket.disconnect(), 1000 * delay)
|
||||||
this.ide.showLockEditorMessageModal(
|
this.ide.showLockEditorMessageModal(
|
||||||
'Please wait',
|
'Please wait',
|
||||||
`\
|
`\
|
||||||
|
|
Loading…
Reference in a new issue