mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: decrypt race condition
This commit is contained in:
@@ -524,11 +524,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const decryptionTask = decrypt()
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
processingMutex.mutex(
|
processingMutex.mutex(
|
||||||
async() => {
|
async() => {
|
||||||
await decryptionTask
|
await decrypt()
|
||||||
// message failed to decrypt
|
// message failed to decrypt
|
||||||
if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) {
|
if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) {
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|||||||
Reference in New Issue
Block a user