This code stems from #1366, which said "expose to both IPv4 and IPv6":
|
let address = if cfg!(windows) { |
|
SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), *port) |
|
} else { |
|
// this creates a dual stack socket on non-windows systems |
|
SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), *port) |
|
}; |
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?
This code stems from #1366, which said "expose to both IPv4 and IPv6":
librespot/discovery/src/server.rs
Lines 284 to 289 in 9c7d756
Unfortunately it breaks discovery on systems set up with IPv4 only (eg. piCorePlayer.org, a TinyCore based distribution):
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?