Browse Source

Merge pull request #1172 from Dieterbe/minor

Minor changes
Vlad Gorodetsky 6 years ago
parent
commit
74799833f4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client.go

+ 1 - 1
client.go

@@ -176,7 +176,7 @@ func (client *client) Config() *Config {
 func (client *client) Brokers() []*Broker {
 	client.lock.RLock()
 	defer client.lock.RUnlock()
-	brokers := make([]*Broker, 0)
+	brokers := make([]*Broker, 0, len(client.brokers))
 	for _, broker := range client.brokers {
 		brokers = append(brokers, broker)
 	}