1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Oops: set keepAliveTimer!

This commit is contained in:
David Baker
2016-02-09 17:39:30 +00:00
parent b40a6d1481
commit e506a1b2de

View File

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