Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Commit

Permalink
Let listeners emit COUNT too
Browse files Browse the repository at this point in the history
  • Loading branch information
Dougley committed May 12, 2017
1 parent 028f61c commit 0044436
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Bezerk.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ function process (socket, message) {
return
}
if (socket.type === 'listener' || msg.op === 'EVAL') {
if (msg.op === 'COUNT') {
send({
op: 'COUNT_REPLY',
c: {
shards: shards.length,
listeners: receivers.length
}
})
}
if (msg.shard) {
Logger('Listener event defined a shard, trying to find it and send the message.')
for (let shard of shards) {
Expand Down

0 comments on commit 0044436

Please sign in to comment.