Fix crashing when removing hc

This commit is contained in:
Owen
2026-04-27 15:03:36 -07:00
parent 1a67ff30c2
commit 5c43db466a
2 changed files with 4 additions and 4 deletions

View File

@@ -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()