Allow disabling debug server

This commit is contained in:
q3k 2018-08-27 21:07:23 +01:00
parent a509a47a50
commit b27d528d69

View file

@ -123,6 +123,9 @@ func (s *server) serveForever() {
}()
glog.Infof("Listening for GRPC on %v", s.opts.listenAddress)
if s.opts.debugAddress == "" {
glog.Info("Disabling debug HTTP server")
} else {
httpMux := http.NewServeMux()
httpMux.HandleFunc("/debug/status", statusz.StatusHandler)
httpMux.HandleFunc("/debug/requests", trace.Traces)
@ -138,6 +141,7 @@ func (s *server) serveForever() {
}
}()
glog.Infof("Listening for HTTP on %v", s.opts.debugAddress)
}
select {}
}