mirror of
https://github.com/fosrl/newt.git
synced 2026-05-20 07:09:55 +00:00
Fix crashing when removing hc
This commit is contained in:
2
main.go
2
main.go
@@ -542,7 +542,7 @@ func runNewtMain(ctx context.Context) {
|
||||
if telErr != nil {
|
||||
logger.Warn("Telemetry init failed: %v", telErr)
|
||||
}
|
||||
if tel != nil {
|
||||
if tel != nil && (metricsEnabled || pprofEnabled) {
|
||||
// Admin HTTP server (exposes /metrics when Prometheus exporter is enabled)
|
||||
logger.Debug("Starting metrics server on %s", tcfg.AdminAddr)
|
||||
mux := http.NewServeMux()
|
||||
|
||||
Reference in New Issue
Block a user