diff --git a/client.go b/client.go index 29c0ddc7b..da3779b46 100644 --- a/client.go +++ b/client.go @@ -463,6 +463,10 @@ func (client *client) RefreshBrokers(addrs []string) error { _ = broker.Close() } + for _, broker := range client.deadSeeds { + _ = broker.Close() + } + client.seedBrokers = nil client.deadSeeds = nil