log errors from monitoring call
This commit is contained in:
parent
03debcc17f
commit
193dc695d1
7
main.go
7
main.go
|
@ -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)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue