log errors from monitoring call

This commit is contained in:
lemmi 2021-12-16 06:05:39 +01:00
parent 03debcc17f
commit 193dc695d1
1 changed files with 6 additions and 1 deletions

View File

@ -377,7 +377,12 @@ func cachedRender(rs *routeStats) http.HandlerFunc {
func main() {
rs := newRouteStats()
done := make(chan struct{})
go monitor(done, rs)
go func() {
err := monitor(done, rs)
if err != nil {
log.Fatal(err)
}
}()
log.Fatal(http.ListenAndServe(":8080", cachedRender(rs)))
}