server can start when no network for local dev

This commit is contained in:
chrislu
2025-10-30 08:58:54 -07:00
parent db35159a41
commit a6da3eb770

View File

@@ -44,12 +44,16 @@ func selectIpV4(netInterfaces []net.Interface, isIpV4 bool) string {
} }
} else { } else {
if ipNet.IP.To16() != nil { if ipNet.IP.To16() != nil {
// Filter out link-local IPv6 addresses (fe80::/10)
// They require zone identifiers and are not suitable for server binding
if !ipNet.IP.IsLinkLocalUnicast() {
return ipNet.IP.String() return ipNet.IP.String()
} }
} }
} }
} }
} }
}
return "" return ""
} }