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:44:49 +02:00
parent 202f2de988
commit 99870d8eac
+1 -1
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 {