mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #1427] [MERGED] discovery: don't panic on libmdns errors #1385
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
dev← Head:no-libmdns-unwrap📝 Commits (1)
b0f805ddiscovery: 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
innermethod 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.