crossoverJie commented on code in PR #1197:
URL: https://github.com/apache/pulsar-client-go/pull/1197#discussion_r1667619137


##########
pulsar/consumer_partition.go:
##########
@@ -1673,11 +1680,8 @@ func (pc *partitionConsumer) reconnectToBroker() {
                        return
                }
 
-               if pc.options.backoffPolicy == nil {
-                       delayReconnectTime = defaultBackoff.Next()
-               } else {
-                       delayReconnectTime = pc.options.backoffPolicy.Next()
-               }
+               delayReconnectTime = bo.Next()
+               totalDelayReconnectTime += delayReconnectTime

Review Comment:
   After a successful reconnection at line 1699, the function will exit, and 
the `delayReconnectTime` variable will be initialized during the next 
reconnection. 
   
   Therefore, there is no need to reset `delayReconnectTime` here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to