diff --git a/pkg/driver/driver.go b/pkg/driver/driver.go index 30f0f307f..4615ab6ef 100644 --- a/pkg/driver/driver.go +++ b/pkg/driver/driver.go @@ -21,8 +21,6 @@ const ( PostgreSQL string = "postgres" ) -var timeout = time.Minute * 5 - type InitConnFunc func(context.Context, driver.Conn) error // RetryConnector wraps driver.Connector with retry logic. @@ -57,7 +55,7 @@ func (c RetryConnector) Connect(ctx context.Context) (driver.Conn, error) { shouldRetry, backoff.NewExponentialWithJitter(time.Millisecond*128, time.Minute*1), retry.Settings{ - Timeout: timeout, + Timeout: time.Minute * 5, OnError: func(_ time.Duration, _ uint64, err, lastErr error) { telemetry.UpdateCurrentDbConnErr(err)