diff --git a/cmd/broadcast/main.go b/cmd/broadcast/main.go index 237ea0b..e2d14a0 100644 --- a/cmd/broadcast/main.go +++ b/cmd/broadcast/main.go @@ -157,9 +157,23 @@ func main() { } if isValidTLSConf(logger) { - go http.ListenAndServeTLS(*addr, *tlsCert, *tlsKey, handler) + go func() { + if err := http.ListenAndServeTLS(*addr, *tlsCert, *tlsKey, handler); err != nil { + logger.Err(map[string]any{ + "msg": "Could not bind", + "err": err.Error(), + }) + } + }() } else { - go http.ListenAndServe(*addr, handler) + go func() { + if err := http.ListenAndServe(*addr, handler); err != nil { + logger.Err(map[string]any{ + "msg": "Could not bind", + "err": err.Error(), + }) + } + }() } if err := radio.Run(ctx); err != nil {