mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-02 16:59:09 +02:00
Fix division by zero when connecting to the DB.
Apparently the retry function's first parameter is the duration of a single attempt and it cannot be zero.
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ func (c *Cluster) initDbConn() error {
|
||||
}
|
||||
|
||||
c.logger.Debug("new database connection")
|
||||
err = retryutil.Retry(0, constants.PostgresConnectRetryTimeout,
|
||||
err = retryutil.Retry(constants.PostgresConnectTimeout, constants.PostgresConnectRetryTimeout,
|
||||
func() (bool, error) {
|
||||
err := conn.Ping()
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user