mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
also abort timeout timer when response is rejected
This commit is contained in:
parent
4ffaa82435
commit
4de29779c7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user