Преглед изворни кода

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 пре 6 година
родитељ
комит
1982a06ad6
1 измењених фајлова са 1 додато и 1 уклоњено
  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 {