mDNS: warn instead of fatal error (#25517)

This commit is contained in:
andig 2025-11-24 11:40:01 +01:00 • committed by GitHub
parent aecec1162e
commit 22c9550a30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -269,7 +269,9 @@ func runRoot(cmd *cobra.Command, args []string) {
// announce on mDNS
if err == nil {
err = configureMDNS(conf.Network)
if err := configureMDNS(conf.Network); err != nil {
log.WARN.Println("mDNS:", err)
}
}
// start SHM server

View file

@ -763,7 +763,7 @@ func configureMDNS(conf globalconfig.Network) error {
zc, err := zeroconf.RegisterProxy("evcc", "_http._tcp", "local.", conf.Port, host, nil, text, nil)
if err != nil {
return fmt.Errorf("mDNS announcement: %w", err)
return err
}
shutdown.Register(zc.Shutdown)