From e506a1b2dee5ca0c98d92878b8e7092ee034005b Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 9 Feb 2016 17:39:30 +0000 Subject: [PATCH] Oops: set keepAliveTimer! --- lib/sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sync.js b/lib/sync.js index e7d1640b9..95ce30f79 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -667,9 +667,9 @@ SyncApi.prototype._pokeKeepAlive = function() { // We wait a short time though, just in case somehow the server // is in a mode where it 400s /versions responses and sync etc. // responses fail, this will mean we don't hammer in a loop. - setTimeout(success, 2000); + self._keepAliveTimer = setTimeout(success, 2000); } else { - setTimeout( + self._keepAliveTimer = setTimeout( self._pokeKeepAlive.bind(self), 5000 + Math.floor(Math.random() * 5000) );