[PR #1427] [MERGED] discovery: don't panic on libmdns errors #1385

Closed
opened 2026-02-27 20:02:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/1427
Author: @wisp3rwind
Created: 12/19/2024
Status: Merged
Merged: 12/19/2024
Merged by: @roderickvd

Base: devHead: no-libmdns-unwrap


📝 Commits (1)

  • b0f805d discovery: don't panic on libmdns errors

📊 Changes

2 files changed (+6 additions, -5 deletions)

View changed files

📝 CHANGELOG.md (+2 -1)
📝 discovery/src/lib.rs (+4 -4)

📄 Description

Small improvement to discovery error handling (in fact, with the design of the code with an inner method which allows using the ? operator, I suspect this was the intended code in the first place). Partially fixes #1404 by yielding the error to the main task, which can exit librespot an in turn give the service manager a chance to restart.

In detail: On panic, the discovery task crashes, but the main program is not notified of this. Returning an error will result in the Discovery stream yielding None, serving as notification to the application (which might shutdown with error, for example, if no other means of authentication is available).


🔄 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/librespot-org/librespot/pull/1427 **Author:** [@wisp3rwind](https://github.com/wisp3rwind) **Created:** 12/19/2024 **Status:** ✅ Merged **Merged:** 12/19/2024 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `no-libmdns-unwrap` --- ### 📝 Commits (1) - [`b0f805d`](https://github.com/librespot-org/librespot/commit/b0f805dde9eed3da0c0847bf16c54b3d3e60b70a) discovery: don't panic on libmdns errors ### 📊 Changes **2 files changed** (+6 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -1) 📝 `discovery/src/lib.rs` (+4 -4) </details> ### 📄 Description Small improvement to discovery error handling (in fact, with the design of the code with an `inner` method which allows using the `?` operator, I suspect this was the intended code in the first place). Partially fixes #1404 by yielding the error to the main task, which can exit librespot an in turn give the service manager a chance to restart. In detail: On panic, the discovery task crashes, but the main program is not notified of this. Returning an error will result in the Discovery stream yielding None, serving as notification to the application (which might shutdown with error, for example, if no other means of authentication is available). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:02:15 +03: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
starred/librespot#1385
No description provided.