mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
fix lastUpdate in ConnectionManager
This commit is contained in:
parent
d57e191ad0
commit
f894048292
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue