Log errors
This commit is contained in:
parent
1f013a9de6
commit
85dcade750
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user