check for updateListeners errors
This commit is contained in:
parent
2b3cf0bf61
commit
ab75e4a1b5
@ -100,7 +100,9 @@ func logic() error {
|
||||
}
|
||||
w.Write(b)
|
||||
})
|
||||
updateListeners()
|
||||
if err := updateListeners(); err != nil {
|
||||
return err
|
||||
}
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
for range ch {
|
||||
|
@ -82,7 +82,9 @@ func logic() error {
|
||||
log.Printf("cannot resolve DHCP hostnames: %v", err)
|
||||
}
|
||||
http.Handle("/metrics", srv.PrometheusHandler())
|
||||
updateListeners(srv.Mux)
|
||||
if err := updateListeners(srv.Mux); err != nil {
|
||||
return err
|
||||
}
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
for range ch {
|
||||
|
@ -110,7 +110,9 @@ func updateListeners() error {
|
||||
func logic() error {
|
||||
if *linger {
|
||||
http.Handle("/metrics", promhttp.Handler())
|
||||
updateListeners()
|
||||
if err := updateListeners(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGUSR1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user