fix: event listener accumulation from rpc client

This commit is contained in:
izzy 2025-12-29 17:11:37 +00:00
parent cb373b6dc6
commit d3d5384f93
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,9 @@ let rpc: Client;
export async function initDiscordRpc() {
if (!config.discordRpc) return;
// clean up existing client if one exists
rpc?.removeAllListeners();
try {
rpc = new Client({ transport: "ipc" });