Use throwOnTimeout option for PQueue

This commit is contained in:
Fedor Indutny
2021-11-23 23:01:03 +01:00
committed by GitHub
parent bd6ee4b16d
commit 76a30a5196
10 changed files with 54 additions and 10 deletions

View File

@@ -516,7 +516,11 @@ export class SignalProtocolStore extends EventsMixin {
}
private _createSenderKeyQueue(): PQueue {
return new PQueue({ concurrency: 1, timeout: 1000 * 60 * 2 });
return new PQueue({
concurrency: 1,
timeout: 1000 * 60 * 2,
throwOnTimeout: true,
});
}
private _getSenderKeyQueue(senderId: QualifiedAddress): PQueue {
@@ -663,7 +667,11 @@ export class SignalProtocolStore extends EventsMixin {
}
private _createSessionQueue(): PQueue {
return new PQueue({ concurrency: 1, timeout: 1000 * 60 * 2 });
return new PQueue({
concurrency: 1,
timeout: 1000 * 60 * 2,
throwOnTimeout: true,
});
}
private _getSessionQueue(id: QualifiedAddress): PQueue {