Skip to content

Commit e66e358

Browse files
committed
return ExponentialBackoff early
1 parent 57775ec commit e66e358

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

conn.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ func (c *conn) startQuery(ctx context.Context, query string) (string, error) {
198198
}
199199

200200
func newBackoff(pollMode PollMode, pollFrequency time.Duration) backoff.BackOff {
201-
if pollMode == PollModeConstant {
202-
return backoff.NewConstantBackOff(pollFrequency)
201+
if pollMode == PollModeExponential {
202+
return backoff.NewExponentialBackOff()
203203
}
204-
return backoff.NewExponentialBackOff()
204+
return backoff.NewConstantBackOff(pollFrequency)
205205
}
206206

207207
// waitOnQuery blocks until a query finishes, returning an error if it failed.

0 commit comments

Comments
 (0)