fix(discovery): add SO_REUSEPORT for multiple mDNS listeners
This commit is contained in:
parent
33a8c939ee
commit
590e429630
|
|
@ -30,6 +30,7 @@ pub const DiscoveryService = struct {
|
|||
|
||||
// 2. Allow port reuse (standard for mDNS)
|
||||
try posix.setsockopt(fd, posix.SOL.SOCKET, posix.SO.REUSEADDR, &std.mem.toBytes(@as(i32, 1)));
|
||||
try posix.setsockopt(fd, posix.SOL.SOCKET, posix.SO.REUSEPORT, &std.mem.toBytes(@as(i32, 1)));
|
||||
|
||||
// 3. Bind to all interfaces on mDNS port
|
||||
const bind_addr = try net.Address.parseIp("0.0.0.0", MULTICAST_PORT);
|
||||
|
|
|
|||
Loading…
Reference in New Issue