diff --git a/src/database.js b/src/database.js index 40399aa028..14a5a52892 100644 --- a/src/database.js +++ b/src/database.js @@ -30,11 +30,15 @@ function setupSecondaryDB() { primaryDBhelpers = primaryDB.helpers; primaryDB.init = function(callback) { - async.parallel([primaryDBinit, secondaryDB.init], callback); + async.parallel([primaryDBinit, secondaryDB.init], function(err, results) { + callback(err); + }); }; primaryDB.close = function(callback) { - async.parallel([primaryDBclose, secondaryDB.close], callback); + async.parallel([primaryDBclose, secondaryDB.close], function(err, results) { + callback(err); + }); }; primaryDB.helpers = {};