Discovery failing on IPv4 only setups
Author: michaelhergerCreated Aug 12, 2026Updated Aug 12, 2026
This code stems from #1366, which said "expose to both IPv4 and IPv6": https://github.com/librespot-org/librespot/blob/9c7d75615fc093bdcbdb29adbce3fed38c531852/discovery/src/server.rs#L284-L289
Unfortunately it breaks discovery on systems set up with IPv4 only (eg. piCorePlayer.org, a TinyCore based distribution):
[2026-08-12T19:15:56Z WARN libmdns] Failed to register IPv6 receiver: Os { code: 97, kind: Uncategorized, message: "Address family not supported by protocol" }If I hardcode to using IPv4 only, it would run.
Shouldn't the code gracefully fall back to IPv4 in case IPv6 was not available?
Source: librespot-org/librespot