Skip to content

Commit

Permalink
Merge pull request #41 from tigrisdata/close-sep
Browse files Browse the repository at this point in the history
close old reporter after swapping
singler authored Aug 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents d2aed86 + b35edd1 commit 6aef32b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metrics/metric_provider.go
Original file line number Diff line number Diff line change
@@ -63,8 +63,10 @@ func (mp *MetricProvider) Collect() {
newReporter := NewMetricReporter()
ulog.E(newReporter.collectOnce())

mp.reporter.Close()
oldReporter := mp.reporter
mp.reporter = newReporter

oldReporter.Close()
}
defer ticker.Stop()
}

0 comments on commit 6aef32b

Please sign in to comment.