diff --git a/src/matrix/Sync.js b/src/matrix/Sync.js index 673bed82..b772ad2f 100644 --- a/src/matrix/Sync.js +++ b/src/matrix/Sync.js @@ -83,7 +83,8 @@ export class Sync { // TODO: this should be interruptable by stop, we can reuse _currentRequest syncFilterId = (await this._hsApi.createFilter(this._session.user.id, {room: {state: {lazy_load_members: true}}}).response()).filter_id; } - this._currentRequest = this._hsApi.sync(syncToken, syncFilterId, timeout); + const totalRequestTimeout = timeout + (80 * 1000); // same as riot-web, don't get stuck on wedged long requests + this._currentRequest = this._hsApi.sync(syncToken, syncFilterId, timeout, {timeout: totalRequestTimeout}); const response = await this._currentRequest.response(); syncToken = response.next_batch; const storeNames = this._storage.storeNames;