diff --git a/lib/index-web.js b/lib/index-web.js index 34ff8c662..caef8f992 100644 --- a/lib/index-web.js +++ b/lib/index-web.js @@ -50,7 +50,9 @@ module.exports = function(config, auth, storage) { if (err) throw err // that function shouldn't produce any async.filterSeries(packages, function(package, cb) { auth.allow_access(package.name, req.remote_user, function(err, allowed) { - cb(!err && allowed) + setImmediate(function () { + cb(!err && allowed) + }) }) }, function(packages) { next(template({