We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0845e73 commit 64c87a0Copy full SHA for 64c87a0
pulsar/producer_partition.go
@@ -396,18 +396,18 @@ func (p *partitionProducer) reconnectToBroker() {
396
maxRetry = int(*p.options.MaxReconnectToBroker)
397
}
398
399
+ var (
400
+ delayReconnectTime time.Duration
401
+ defaultBackoff = internal.DefaultBackoff{}
402
+ )
403
+
404
for maxRetry != 0 {
405
if p.getProducerState() != producerReady {
406
// Producer is already closing
407
p.log.Info("producer state not ready, exit reconnect")
408
return
409
410
- var (
- delayReconnectTime time.Duration
- defaultBackoff = internal.DefaultBackoff{}
- )
-
411
if p.options.BackoffPolicy == nil {
412
delayReconnectTime = defaultBackoff.Next()
413
} else {
0 commit comments