add more sl_console debugging to ConnectionManager

This commit is contained in:
Brian Gough 2016-10-31 15:33:09 +00:00
parent e2c66e8d56
commit 2461c1b7be

View file

@ -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