Pārlūkot izejas kodu

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

Drop the broker if we can't connect to it
Evan Huus 11 gadi atpakaļ
vecāks
revīzija
34679b3128
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  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 {
 		if _, err = leader.Connected(); err != nil {
+			p.client.disconnectBroker(leader)
 			return err
 			return err
 		}
 		}