diff --git a/src/matrix/net/HomeServerApi.js b/src/matrix/net/HomeServerApi.js index 65deff2e..4ac7f9e2 100644 --- a/src/matrix/net/HomeServerApi.js +++ b/src/matrix/net/HomeServerApi.js @@ -78,7 +78,8 @@ export class HomeServerApi { () => {} // ignore AbortError ); // abort timeout if request finishes first - requestResult.response().then(() => timeout.abort()); + const abort = () => timeout.abort(); + requestResult.response().then(abort, abort); } const wrapper = new RequestWrapper(method, url, requestResult);