Skip to content

Commit

Permalink
diagnostics: fix setup (#11633)
Browse files Browse the repository at this point in the history
Fixed issue with setup diagnostics client on erigon start
  • Loading branch information
dvovk committed Aug 16, 2024
1 parent 6b8c6eb commit f1e8643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diagnostics/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func Setup(ctx *cli.Context, node *node.ErigonNode, metricsMux *http.ServeMux, p
pprofPort := ctx.Int(pprofPortFlag)
pprofAddress := fmt.Sprintf("%s:%d", pprofHost, pprofPort)

if diagAddress == metricsAddress {
if diagAddress == metricsAddress && metricsMux != nil {
diagMux = SetupDiagnosticsEndpoint(metricsMux, diagAddress)
} else if diagAddress == pprofAddress && pprofMux != nil {
diagMux = SetupDiagnosticsEndpoint(pprofMux, diagAddress)
Expand Down

0 comments on commit f1e8643

Please sign in to comment.