From f894048292826b2a121c91b8bd62ad11c05aaf1c Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 31 Oct 2016 16:19:07 +0000 Subject: [PATCH] fix lastUpdate in ConnectionManager --- .../web/public/coffee/ide/connection/ConnectionManager.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/connection/ConnectionManager.coffee b/services/web/public/coffee/ide/connection/ConnectionManager.coffee index aa4eeb99d1..da7dbbc9b4 100644 --- a/services/web/public/coffee/ide/connection/ConnectionManager.coffee +++ b/services/web/public/coffee/ide/connection/ConnectionManager.coffee @@ -39,7 +39,7 @@ define [], () -> @tryReconnect() @$scope.$on 'cursor:editor:update', () => - @lastUserAction = new Date() + @lastUserAction = new Date() # time of last edit if !@connected @tryReconnect() @@ -170,7 +170,7 @@ define [], () -> startAutoReconnectCountdown: () -> twoMinutes = 2 * 60 * 1000 - if @lastUpdated? and new Date() - @lastUpdated > twoMinutes + if @lastUserAction? and new Date() - @lastUserAction > twoMinutes # between 1 minute and 3 minutes countdown = 60 + Math.floor(Math.random() * 120) else