mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-30 22:02:43 -08:00
fix(client): bound matrix requests so stalled sends can be retried
This commit is contained in:
1 file changed
+3
@@ -226,6 +226,8 @@ const isMismatch = (err: unknown): boolean => {
|
||||
);
|
||||
};
|
||||
|
||||
const REQUEST_TIMEOUT_MS = 30_000;
|
||||
|
||||
type BuiltClient = {
|
||||
mx: MatrixClient;
|
||||
indexedDBStore: IndexedDBStore;
|
||||
@@ -261,6 +263,7 @@ const buildClient = async (session: Session): Promise<BuiltClient> => {
|
||||
cryptoCallbacks: cryptoCallbacks as unknown as CryptoCallbacks,
|
||||
verificationMethods: ['m.sas.v1'],
|
||||
tokenRefreshFunction: tokenRefresher?.tokenRefreshFunction,
|
||||
localTimeoutMs: REQUEST_TIMEOUT_MS,
|
||||
});
|
||||
|
||||
return { mx, indexedDBStore };
|
||||
|
||||
Reference in new issue
Block a user