Skip to content

Commit

Permalink
fix:push上报模式支持自动注销
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Jul 17, 2024
1 parent 87aef43 commit 864fd16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/metrics/prometheus/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ func (pa *PushAction) Init(initCtx *plugin.InitContext, reporter *PrometheusRepo
}

func (pa *PushAction) Close() {
pa.pusher.Delete()
if pa.pusher != nil {
pa.pusher.Delete()

Check failure on line 378 in plugin/metrics/prometheus/reporter.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.15.x)

Error return value of `pa.pusher.Delete` is not checked (errcheck)
}
}

func (pa *PushAction) Run(ctx context.Context) {
Expand Down

0 comments on commit 864fd16

Please sign in to comment.