Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discovery: don't panic on libmdns errors #1427

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

wisp3rwind
Copy link
Contributor

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).

@wisp3rwind
Copy link
Contributor Author

Closes #1404

@wisp3rwind
Copy link
Contributor Author

The build failure is #1425

@roderickvd roderickvd requested a review from Copilot December 19, 2024 18:23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@roderickvd
Copy link
Member

Thanks, makes sense. Would you write a CHANGELOG entry?

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).
@wisp3rwind
Copy link
Contributor Author

Thanks, makes sense. Would you write a CHANGELOG entry?

Sorry, forgot about that! Done 🎉

@roderickvd roderickvd merged commit d82d94b into librespot-org:dev Dec 19, 2024
12 of 13 checks passed
@roderickvd
Copy link
Member

Thanks!

@wisp3rwind wisp3rwind deleted the no-libmdns-unwrap branch December 20, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Librespot mDNS-related error on machine startup
2 participants