Fix mdns on android

This commit is contained in:
loucass003 committed 2026-10-27 19:30:09 +01:00
1 parent b0c266039d
commit 3875fda909
1 file changed
-1
@@ -42,7 +42,6 @@ suspend fun bindAndroidMulticast(group: ByteArray, port: Int, interfaceAddress:
.setOption(StandardSocketOptions.SO_REUSEADDR, true)
.setOption(StandardSocketOptions.IP_MULTICAST_IF, iface)
.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, true)
// The wildcard of InetSocketAddress(port) is IPv6 on Android, which an INET channel rejects
.bind(InetSocketAddress(InetAddress.getByAddress(ByteArray(4)), port))
channel.join(groupAddress, iface)
AndroidMulticastSocket(channel, InetSocketAddress(groupAddress, port))