From 7ed2f9bd9a092760cbb80f848ec38c9b7f500af0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 30 May 2022 11:46:27 +0100 Subject: [PATCH 1/2] Lower timeout on js-sdk API call to 5s --- src/matrix-utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/matrix-utils.ts b/src/matrix-utils.ts index e3617c5..e3b236f 100644 --- a/src/matrix-utils.ts +++ b/src/matrix-utils.ts @@ -80,6 +80,9 @@ export async function initClient( ...storeOpts, ...clientOptions, useAuthorizationHeader: true, + // Use a relatively low timeout for API calls: this is a realtime + // so we don't want API calls taking ages, we'd rather they just fail. + localTimeoutMs: 5000, }); try { From f07ee54e05cc117bb206d2a6ff2251942f61877b Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 1 Jun 2022 10:04:49 +0100 Subject: [PATCH 2/2] Finish sentence Co-authored-by: Robin --- src/matrix-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix-utils.ts b/src/matrix-utils.ts index e3b236f..3d295e5 100644 --- a/src/matrix-utils.ts +++ b/src/matrix-utils.ts @@ -80,7 +80,7 @@ export async function initClient( ...storeOpts, ...clientOptions, useAuthorizationHeader: true, - // Use a relatively low timeout for API calls: this is a realtime + // Use a relatively low timeout for API calls: this is a realtime application // so we don't want API calls taking ages, we'd rather they just fail. localTimeoutMs: 5000, });