mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: do not add to pre-buffer if waiting for end
This commit is contained in:
@@ -162,6 +162,12 @@ export const makeEventBuffer = (logger: Logger): BaileysBufferableEventEmitter =
|
|||||||
},
|
},
|
||||||
processInBuffer(task) {
|
processInBuffer(task) {
|
||||||
if(isBuffering) {
|
if(isBuffering) {
|
||||||
|
// if flushing right now,
|
||||||
|
// adding this won't make a difference
|
||||||
|
if(waitingForPreBufferEnd) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
preBufferTask = Promise.allSettled([ preBufferTask, task ])
|
preBufferTask = Promise.allSettled([ preBufferTask, task ])
|
||||||
preBufferTraces.push(new Error('').stack!)
|
preBufferTraces.push(new Error('').stack!)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user