Ver código fonte

Merge pull request #280 from Shopify/disconnect-bad-broker

Drop the broker if we can't connect to it
Evan Huus 11 anos atrás
pai
commit
34679b3128
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      producer.go

+ 1 - 0
producer.go

@@ -372,6 +372,7 @@ func (p *Producer) leaderDispatcher(topic string, partition int32, input chan *M
 		}
 
 		if _, err = leader.Connected(); err != nil {
+			p.client.disconnectBroker(leader)
 			return err
 		}