diff --git a/src/core/abc/manager.abc.ts b/src/core/abc/manager.abc.ts index e5a4bbc2..c19f75e3 100644 --- a/src/core/abc/manager.abc.ts +++ b/src/core/abc/manager.abc.ts @@ -57,6 +57,7 @@ export abstract class SessionManager protected gowsConfigService: GowsEngineConfigService, ) { this.lock = new AsyncLock({ + timeout: 5_000, maxPending: Infinity, maxExecutionTime: 30_000, }); diff --git a/src/core/engines/noweb/store/NowebPersistentStore.ts b/src/core/engines/noweb/store/NowebPersistentStore.ts index 794ecbdd..8d378257 100644 --- a/src/core/engines/noweb/store/NowebPersistentStore.ts +++ b/src/core/engines/noweb/store/NowebPersistentStore.ts @@ -64,11 +64,13 @@ export class NowebPersistentStore implements INowebStore { public presences: any; private lock: any = new AsyncLock({ + timeout: 5_000, maxPending: Infinity, maxExecutionTime: 60_000, }); private groupsFetchLock: any = new AsyncLock({ + timeout: 5_000, maxPending: Infinity, maxExecutionTime: 60_000, }); diff --git a/src/core/engines/noweb/useMultiFileAuthState.ts b/src/core/engines/noweb/useMultiFileAuthState.ts index 1d7bef4e..906adbe4 100644 --- a/src/core/engines/noweb/useMultiFileAuthState.ts +++ b/src/core/engines/noweb/useMultiFileAuthState.ts @@ -19,6 +19,7 @@ const AsyncLock = require('async-lock'); // Default pending is 1000, set it to infinity // https://github.com/rogierschouten/async-lock/issues/63 const fileLock = new AsyncLock({ + timeout: 5_000, maxPending: Infinity, maxExecutionTime: 30_000, });