fix(core): mdns fails if service already registered

This commit is contained in:
Adam 2025-12-31 07:33:49 -06:00
parent 3650fefe2d
commit 50ef866a02
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75

View file

@ -2708,7 +2708,7 @@ export namespace Server {
opts.hostname !== "localhost" &&
opts.hostname !== "::1"
if (shouldPublishMDNS) {
MDNS.publish(server.port!)
MDNS.publish(server.port!, `opencode-${server.port!}`)
} else if (opts.mdns) {
log.warn("mDNS enabled but hostname is loopback; skipping mDNS publish")
}