diff --git a/libStorage.js b/libStorage.js index 4c9a954..c0f4bd1 100644 --- a/libStorage.js +++ b/libStorage.js @@ -55,7 +55,7 @@ function runSQL(sqlQuery, connection, callback = (err, rows) => { return callback(err, undefined); } log.WARN(`Database connection is unavailable, waiting ${ retryTimeout / 1000 } seconds...`); - retry += 1 + _retry += 1 // Wait for the retry timeout before trying the query again setTimeout(runSQL(sqlQuery, connection, callback, _retry)); }