Skip to content

Node.js based forum software built for the modern web

use eachSeries instead

psychobunny6f0c00bb9ff8
diff --git a/src/upgrade.js b/src/upgrade.js
index 65f62059de..0f863c757c 100644
--- a/src/upgrade.js
+++ b/src/upgrade.js
@@ -513,7 +513,7 @@ Upgrade.upgrade = function(callback) {
async.waterfall([
function(next) {
- async.each(groups, function(group, next) {
+ async.eachSeries(groups, function(group, next) {
if (group.privileges['groups:read']) {
return groupsAPI.join('cid:' + cid + ':privileges:groups:topics:read', group.name, function(err) {
if (!err) {
@@ -528,7 +528,7 @@ Upgrade.upgrade = function(callback) {
}, next);
},
function(next) {
- async.each(users, function(user, next) {
+ async.eachSeries(users, function(user, next) {
if (user.privileges['read']) {
return groupsAPI.join('cid:' + cid + ':privileges:topics:read', user.uid, function(err) {
if (!err) {