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

Commit

Permalink
Small change
Browse files Browse the repository at this point in the history
  • Loading branch information
Dougley committed Jan 20, 2017
1 parent ef11260 commit 33c0c2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Bezerk.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ function process (socket, message) {
Logger('Socket tried sending events without being identified first.')
return
}
if (socket.type === 'listener') {
if (socket.type === 'listener' || msg.op === 'EVAL') {
if (msg.shard) {
Logger('Listener event defined a shard, trying to find it and send the message.')
for (let shard of shards) {
if (shard.shardInfo[0] === msg.shard) {
Logger('Shard found, sending payload.')
shard.send(msg)
shard.send(JSON.stringify(msg))
}
}
} else {
Logger('Listener event did not define a shard, falling back to sending to all shards.')
for (let shard of shards) {
shard.send(msg)
shard.send(JSON.stringify(msg))
}
}
} else {
Expand Down

0 comments on commit 33c0c2f

Please sign in to comment.