Explorar el Código

Disconnect the broker when it returns us certain errors

Specifically, in the cases that indicate it is probably unreachable or
something. Otherwise we never reconnect, even if it comes back up.

Fixes #133
Evan Huus hace 12 años
padre
commit
9eb8bcccd5
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      producer.go

+ 1 - 0
producer.go

@@ -339,6 +339,7 @@ func (bp *brokerProducer) flushRequest(p *Producer, prb produceRequestBuilder, e
 		errorCb(err)
 		return false
 	default:
+		p.client.disconnectBroker(bp.broker)
 		overlimit := 0
 		prb.reverseEach(func(msg *produceMessage) {
 			if err := msg.reenqueue(p); err != nil {