From 753857eb512de1315f8daaecc7c798c428a99e93 Mon Sep 17 00:00:00 2001 From: TTtie Date: Sat, 2 Nov 2024 14:53:43 +0000 Subject: [PATCH] free the nonce buffer and the secret buffer after disconnecting --- lib/voice/VoiceConnection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/voice/VoiceConnection.js b/lib/voice/VoiceConnection.js index 1d79f168..0182f592 100644 --- a/lib/voice/VoiceConnection.js +++ b/lib/voice/VoiceConnection.js @@ -538,6 +538,10 @@ class VoiceConnection extends EventEmitter { this.sessionID = null; this.token = null; this.wsSequence = -1; + this.secret?.free(); + this.#nonceBuffer?.free(); + this.secret = null; + this.#nonceBuffer = null; this.#stablelib = null; this.updateVoiceState(); /**