do not retry here

Part of #690
This commit is contained in:
Girish Ramakrishnan
2020-06-03 16:08:37 -07:00
parent 42cbcc6ce3
commit c5cc404b3e

View File

@@ -113,10 +113,7 @@ function beginTransaction(callback) {
if (gConnectionPool === null) return callback(new BoxError(BoxError.DATABASE_ERROR, 'No database connection pool.'));
gConnectionPool.getConnection(function (error, connection) {
if (error) {
console.error('Unable to get connection to database. Try again in a bit.', error.message);
return setTimeout(beginTransaction.bind(null, callback), 1000);
}
if (error) return callback(error);
connection.beginTransaction(function (error) {
if (error) return callback(error);