send messages to clients with concurrency of 2

This commit is contained in:
Shane Kilkelly 2019-10-11 10:01:21 +01:00
parent 06aa578bdc
commit 2cc2be3d9c

View file

@ -91,7 +91,8 @@ module.exports = WebsocketLoadBalancer =
}, "distributing event to clients"
seen = {}
# Send the messages to clients async, don't wait for them all to finish
Async.eachSeries clientList
Async.eachLimit clientList
, 2
, (client, cb) ->
Utils.getClientAttributes client, ['is_restricted_user'], (err, {is_restricted_user}) ->
return cb(err) if err?