mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: stream destroy
This commit is contained in:
@@ -371,18 +371,14 @@ export const encryptedStream = async(
|
|||||||
didSaveToTmpPath
|
didSaveToTmpPath
|
||||||
}
|
}
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
try {
|
// destroy all streams with error
|
||||||
// destroy all streams with error
|
encWriteStream.destroy()
|
||||||
encWriteStream.destroy(error)
|
writeStream?.destroy()
|
||||||
writeStream?.destroy(error)
|
aes.destroy()
|
||||||
aes.destroy(error)
|
hmac.destroy()
|
||||||
hmac.destroy(error)
|
sha256Plain.destroy()
|
||||||
sha256Plain.destroy(error)
|
sha256Enc.destroy()
|
||||||
sha256Enc.destroy(error)
|
stream.destroy()
|
||||||
stream.destroy(error)
|
|
||||||
} catch{
|
|
||||||
// swallow error
|
|
||||||
}
|
|
||||||
|
|
||||||
if(didSaveToTmpPath) {
|
if(didSaveToTmpPath) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user