Skip to content

Commit

Permalink
free the nonce buffer and the secret buffer after disconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
TTtie committed Nov 2, 2024
1 parent 3edd7f1 commit 753857e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/voice/VoiceConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
/**
Expand Down

0 comments on commit 753857e

Please sign in to comment.