Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metrics): fix race condition when calling Broker.Open() twice (#2428
) On failure, `Broker.Open()` can be called several times while a producer is running. In #2409, it was assumed that AsyncProduce can only be called with an open broker, however, it should be read that a user should call it after opening the broker. The broker could be disconnected and in progress of being reconnected. This is not hard to fix as we already have a lock protecting the creation of the registry: just don't create a new metric registry when attempting to reopen the broker. Fix #2320 (again)
- Loading branch information