Explorar el Código

Fix ExponentialReconnectionPolicy not incrementing correctly (#1374)

ExponentialReconnectionPolicy doesn't honor the number of retries made, since it uses the wrong argument for the attempt count.
Bahadır Kandemir hace 6 años
padre
commit
1982a06ad6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      policies.go

+ 1 - 1
policies.go

@@ -945,7 +945,7 @@ type ExponentialReconnectionPolicy struct {
 }
 
 func (e *ExponentialReconnectionPolicy) GetInterval(currentRetry int) time.Duration {
-	return getExponentialTime(e.InitialInterval, math.MaxInt16*time.Second, e.GetMaxRetries())
+	return getExponentialTime(e.InitialInterval, math.MaxInt16*time.Second, currentRetry)
 }
 
 func (e *ExponentialReconnectionPolicy) GetMaxRetries() int {