Wrap eventHandlerQueue jobs with task with timeout

This commit is contained in:
Fedor Indutny 2022-11-09 10:59:32 -08:00 committed by GitHub
parent 5cee260063
commit d7a2669b49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 112 additions and 116 deletions

View file

@ -1935,7 +1935,7 @@ export default class MessageReceiver
}
await p;
const message = await this.processDecrypted(envelope, msg);
const message = this.processDecrypted(envelope, msg);
const groupId = this.getProcessedGroupId(message);
const isBlocked = groupId ? this.isGroupBlocked(groupId) : false;
const { source, sourceUuid } = envelope;
@ -2234,7 +2234,7 @@ export default class MessageReceiver
logUnexpectedUrgentValue(envelope, type);
const message = await this.processDecrypted(envelope, msg);
const message = this.processDecrypted(envelope, msg);
const groupId = this.getProcessedGroupId(message);
const isBlocked = groupId ? this.isGroupBlocked(groupId) : false;
const { source, sourceUuid } = envelope;
@ -3324,10 +3324,10 @@ export default class MessageReceiver
await this.storage.protocol.archiveAllSessions(theirUuid);
}
private async processDecrypted(
private processDecrypted(
envelope: ProcessedEnvelope,
decrypted: Proto.IDataMessage
): Promise<ProcessedDataMessage> {
): ProcessedDataMessage {
return processDataMessage(decrypted, envelope.timestamp);
}
}