1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Rust crypto: set a timeout on outgoing HTTP requests (#4761)

This commit is contained in:
Richard van der Hoff
2025-03-19 16:37:52 +00:00
committed by GitHub
parent fd47a189e0
commit e2bdb2f057

View File

@@ -219,6 +219,12 @@ export class OutgoingRequestProcessor {
// we use the full prefix // we use the full prefix
prefix: "", prefix: "",
// We set a timeout of 60 seconds to guard against requests getting stuck forever and wedging the
// request loop (cf https://github.com/element-hq/element-web/issues/29534).
//
// (XXX: should we do this in the whole of the js-sdk?)
localTimeoutMs: 60000,
}; };
return await this.http.authedRequest<string>(method, path, queryParams, body, opts); return await this.http.authedRequest<string>(method, path, queryParams, body, opts);