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:
parent
202f2de988
commit
99870d8eac
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue