Skip to content

Commit e2bdb2f

Browse files
authored
Rust crypto: set a timeout on outgoing HTTP requests (#4761)
1 parent fd47a18 commit e2bdb2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rust-crypto/OutgoingRequestProcessor.ts

+6
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ export class OutgoingRequestProcessor {
219219

220220
// we use the full prefix
221221
prefix: "",
222+
223+
// We set a timeout of 60 seconds to guard against requests getting stuck forever and wedging the
224+
// request loop (cf https://github.com/element-hq/element-web/issues/29534).
225+
//
226+
// (XXX: should we do this in the whole of the js-sdk?)
227+
localTimeoutMs: 60000,
222228
};
223229

224230
return await this.http.authedRequest<string>(method, path, queryParams, body, opts);

0 commit comments

Comments
 (0)