mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
keep track of reconnect timer
This commit is contained in:
@@ -192,10 +192,16 @@ define [], () ->
|
|||||||
, 200)
|
, 200)
|
||||||
|
|
||||||
cancelReconnect: () ->
|
cancelReconnect: () ->
|
||||||
clearTimeout @timeoutId if @timeoutId?
|
# clear timeout and set to null so we know there is no countdown running
|
||||||
|
if @timeoutId?
|
||||||
|
sl_console.log "[ConnectionManager] cancelling existing reconnect timer"
|
||||||
|
clearTimeout @timeoutId
|
||||||
|
@timeoutId = null
|
||||||
|
|
||||||
decreaseCountdown: () ->
|
decreaseCountdown: () ->
|
||||||
|
@timeoutId = null
|
||||||
return if !@$scope.connection.reconnection_countdown?
|
return if !@$scope.connection.reconnection_countdown?
|
||||||
|
sl_console.log "[ConnectionManager] decreasing countdown", @$scope.connection.reconnection_countdown
|
||||||
@$scope.$apply () =>
|
@$scope.$apply () =>
|
||||||
@$scope.connection.reconnection_countdown--
|
@$scope.connection.reconnection_countdown--
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user