Explorar el Código

Drop the broker if we can't connect to it

Evan Huus hace 11 años
padre
commit
7663fdc1c2
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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
 		}