[core] NOWEB - Add timeout 5s for async lock
This commit is contained in:
1 parent
d09e931827
commit
38e5bb7bdf
3 files changed
+4
No files matched your search
@@ -57,6 +57,7 @@ export abstract class SessionManager
|
||||
protected gowsConfigService: GowsEngineConfigService,
|
||||
) {
|
||||
this.lock = new AsyncLock({
|
||||
timeout: 5_000,
|
||||
maxPending: Infinity,
|
||||
maxExecutionTime: 30_000,
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user