mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 13:45:17 -05:00
add more sl_console debugging to ConnectionManager
This commit is contained in:
parent
e2c66e8d56
commit
2461c1b7be
1 changed files with 3 additions and 0 deletions
|
@ -169,9 +169,11 @@ define [], () ->
|
||||||
@tryReconnect()
|
@tryReconnect()
|
||||||
|
|
||||||
disconnect: () ->
|
disconnect: () ->
|
||||||
|
sl_console.log "[socket.io] disconnecting client"
|
||||||
@ide.socket.disconnect()
|
@ide.socket.disconnect()
|
||||||
|
|
||||||
startAutoReconnectCountdown: () ->
|
startAutoReconnectCountdown: () ->
|
||||||
|
sl_console.log "[ConnectionManager] starting autoreconnect countdown"
|
||||||
twoMinutes = 2 * 60 * 1000
|
twoMinutes = 2 * 60 * 1000
|
||||||
if @lastUserAction? and new Date() - @lastUserAction > twoMinutes
|
if @lastUserAction? and new Date() - @lastUserAction > twoMinutes
|
||||||
# between 1 minute and 3 minutes
|
# between 1 minute and 3 minutes
|
||||||
|
@ -212,6 +214,7 @@ define [], () ->
|
||||||
@timeoutId = setTimeout (=> @decreaseCountdown()), 1000
|
@timeoutId = setTimeout (=> @decreaseCountdown()), 1000
|
||||||
|
|
||||||
tryReconnect: () ->
|
tryReconnect: () ->
|
||||||
|
sl_console.log "[ConnectionManager] tryReconnect"
|
||||||
@cancelReconnect()
|
@cancelReconnect()
|
||||||
delete @$scope.connection.reconnection_countdown
|
delete @$scope.connection.reconnection_countdown
|
||||||
return if @connected
|
return if @connected
|
||||||
|
|
Loading…
Reference in a new issue