[PR #223] [CLOSED] fix: stop calling DiscordClient::start() when error is thrown #231

Closed
opened 2026-05-22 22:04:22 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/mpd-discord-rpc/pull/223
Author: @Elvyria
Created: 8/12/2025
Status: Closed

Base: masterHead: fix/thread-leak


📝 Commits (1)

  • 52d3525 fix: stop calling DiscordClient::start() when error is thrown

📊 Changes

1 file changed (+1 additions, -6 deletions)

View changed files

📝 src/main.rs (+1 -6)

📄 Description

Closes: https://github.com/JakeStanger/mpd-discord-rpc/issues/204

DiscordClient::start() will attempt to reconnect automatically, calling it manually is allowed for some reason and spawns additional threads.

Tested briefly - closed and opened Discord client around 5 times while running, reconnects automatically, no issues, additional threads are no longer spawned.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/mpd-discord-rpc/pull/223 **Author:** [@Elvyria](https://github.com/Elvyria) **Created:** 8/12/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/thread-leak` --- ### 📝 Commits (1) - [`52d3525`](https://github.com/JakeStanger/mpd-discord-rpc/commit/52d352560059e836520a8da7108dfbbbfa6447da) fix: stop calling `DiscordClient::start()` when error is thrown ### 📊 Changes **1 file changed** (+1 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/main.rs` (+1 -6) </details> ### 📄 Description Closes: https://github.com/JakeStanger/mpd-discord-rpc/issues/204 DiscordClient::start() will attempt to reconnect automatically, calling it manually is allowed for some reason and spawns additional threads. Tested briefly - closed and opened Discord client around 5 times while running, reconnects automatically, no issues, additional threads are no longer spawned. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 22:04:22 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/mpd-discord-rpc#231
No description provided.