Log errors

This commit is contained in:
sfigato 2023-03-08 23:26:05 +01:00
parent 1f013a9de6
commit 85dcade750
Signed by: blallo
GPG Key ID: C530464EEDCF489A

View File

@ -157,9 +157,23 @@ func main() {
} }
if isValidTLSConf(logger) { 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 { } 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 { if err := radio.Run(ctx); err != nil {