fix: decrypt race condition

This commit is contained in:
Adhiraj Singh
2022-11-13 11:08:32 +05:30
parent b2aa51a13d
commit 01a641d3bd

View File

@@ -524,11 +524,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
return
}
const decryptionTask = decrypt()
await Promise.all([
processingMutex.mutex(
async() => {
await decryptionTask
await decrypt()
// message failed to decrypt
if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) {
logger.error(