diff --git a/lib/sync.js b/lib/sync.js index 7f7171613..e670e3702 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -562,14 +562,9 @@ SyncApi.prototype._sync = function(syncOptions, attempt) { */ SyncApi.prototype._pokeKeepAlive = function() { return this.client._http.requestWithPrefix( - undefined, "GET", "/", undefined, - undefined, httpApi.PREFIX_R0, 5 * 1000 - ).catch(function(err) { - if (err.httpStatus > 0) { // we hit the server alright - return q(); - } - throw err; - }); + undefined, "GET", "/_matrix/client/versions", undefined, + undefined, "", 5 * 1000 + ); }; /** diff --git a/spec/unit/matrix-client.spec.js b/spec/unit/matrix-client.spec.js index 076a4297b..b9f33aae9 100644 --- a/spec/unit/matrix-client.spec.js +++ b/spec/unit/matrix-client.spec.js @@ -10,7 +10,7 @@ describe("MatrixClient", function() { var identityServerDomain = "identity.server"; var client, store, scheduler; - var KEEP_ALIVE_PATH = "/"; + var KEEP_ALIVE_PATH = "/_matrix/client/versions"; var PUSH_RULES_RESPONSE = { method: "GET",