Skip to content

Commit

Permalink
Fix memory leak when Broker.Open and Broker.Close called repeatedly
Browse files Browse the repository at this point in the history
  • Loading branch information
darklore authored and Ronan Harmegnies committed Mar 4, 2020
1 parent 29035d4 commit 3f01cdd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,7 @@ func (b *Broker) unregisterMetrics() {
for _, name := range b.registeredMetrics {
b.conf.MetricRegistry.Unregister(name)
}
b.registeredMetrics = nil
}

func (b *Broker) registerMeter(name string) metrics.Meter {
Expand Down

0 comments on commit 3f01cdd

Please sign in to comment.