[PR #997] [MERGED] Avoid crash when Avahi is not available #1178

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/997
Author: @WhyNotHugo
Created: 5/4/2022
Status: Merged
Merged: 5/20/2022
Merged by: @roderickvd

Base: devHead: avoid-unwrap-disco


📝 Commits (1)

  • c4af90f Avoid crashing when Avahi is not available

📊 Changes

3 files changed (+11 additions, -10 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 discovery/src/lib.rs (+1 -2)
📝 src/main.rs (+9 -8)

📄 Description

When librespot is built with Avahi turned on, it will crash if Avahi is
later not available at runtime.

This change avoids it crashing hard when Avahi is not available;
librespot will merely warn of the issue.

This affects some distribution packages too, where the maintainer might
prefer leaving Avahi support enabled, but many setups don't (or can't)
run Avahi.


🔄 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/997 **Author:** [@WhyNotHugo](https://github.com/WhyNotHugo) **Created:** 5/4/2022 **Status:** ✅ Merged **Merged:** 5/20/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `avoid-unwrap-disco` --- ### 📝 Commits (1) - [`c4af90f`](https://github.com/librespot-org/librespot/commit/c4af90f5febaa99b80e1ae9fbed8f638150728f5) Avoid crashing when Avahi is not available ### 📊 Changes **3 files changed** (+11 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `discovery/src/lib.rs` (+1 -2) 📝 `src/main.rs` (+9 -8) </details> ### 📄 Description When librespot is built with Avahi turned on, it will crash if Avahi is later not available at runtime. This change avoids it crashing hard when Avahi is not available; librespot will merely warn of the issue. This affects some distribution packages too, where the maintainer might prefer leaving Avahi support enabled, but many setups don't (or can't) run Avahi. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:28 +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#1178
No description provided.