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:
Oleksii Kliukin 2017-10-18 10:25:46 +02:00
parent 202f2de988
commit 99870d8eac
1 changed files with 1 additions and 1 deletions

View File

@ -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 {