@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user