mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 19:11:56 +02:00
send messages to clients with concurrency of 2
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user