diff --git a/main.go b/main.go index 4b2e090..35bd8ad 100644 --- a/main.go +++ b/main.go @@ -139,7 +139,9 @@ func main() { client := modbus.NewClient(handler) scrape(client) // Start http interface only after first successful scrape - go http.ListenAndServe(*httpAddr, nil) + go func() { + die("http.ListenAndServe: %v", http.ListenAndServe(*httpAddr, nil)) + }() for range time.Tick(*scrapeInterval) { scrape(client) }