Skip to content

Commit 2cecb48

Browse files
committed
free the nonce buffer and the secret buffer after disconnecting
1 parent 30b89d8 commit 2cecb48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/voice/VoiceConnection.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ class VoiceConnection extends EventEmitter {
538538
this.sessionID = null;
539539
this.token = null;
540540
this.wsSequence = -1;
541+
this.secret?.free();
542+
this.#nonceBuffer?.free();
543+
this.secret = null;
544+
this.#nonceBuffer = null;
541545
this.#stablelib = null;
542546
this.updateVoiceState();
543547
/**

0 commit comments

Comments
 (0)