diff --git a/internal/workflow.go b/internal/workflow.go index 6d84e8d8e..0545f808b 100644 --- a/internal/workflow.go +++ b/internal/workflow.go @@ -1849,9 +1849,6 @@ func convertRetryPolicy(retryPolicy *RetryPolicy) *s.RetryPolicy { if retryPolicy == nil { return nil } - if retryPolicy.BackoffCoefficient == 0 { - retryPolicy.BackoffCoefficient = backoff.DefaultBackoffCoefficient - } thriftRetryPolicy := s.RetryPolicy{ InitialIntervalInSeconds: common.Int32Ptr(common.Int32Ceil(retryPolicy.InitialInterval.Seconds())), MaximumIntervalInSeconds: common.Int32Ptr(common.Int32Ceil(retryPolicy.MaximumInterval.Seconds())), @@ -1860,5 +1857,8 @@ func convertRetryPolicy(retryPolicy *RetryPolicy) *s.RetryPolicy { NonRetriableErrorReasons: retryPolicy.NonRetriableErrorReasons, ExpirationIntervalInSeconds: common.Int32Ptr(common.Int32Ceil(retryPolicy.ExpirationInterval.Seconds())), } + if *thriftRetryPolicy.BackoffCoefficient == 0 { + thriftRetryPolicy.BackoffCoefficient = common.Float64Ptr(backoff.DefaultBackoffCoefficient) + } return &thriftRetryPolicy }