Skip to content

Commit

Permalink
fix shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Feb 14, 2015
1 parent 85c4b8d commit df2c677
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,14 @@ function adapter(uri, opts){
if (!remote) {
if (opts.rooms) {
opts.rooms.forEach(function(room) {
var packet = msgpack.encode([uid, packet, opts]);
var channel = prefix + '#' + packet.nsp + '#' + room + '#';
pub.publish(channel, packet);
var chn = prefix + '#' + packet.nsp + '#' + room + '#';
var msg = msgpack.encode([uid, packet, opts]);
pub.publish(chn, msg);
});
} else {
var packet = msgpack.encode([uid, packet, opts]);
pub.publish(prefix + '#' + packet.nsp + '#', packet);
var chn = prefix + '#' + packet.nsp + '#';
var msg = msgpack.encode([uid, packet, opts]);
pub.publish(chn, msg);
}
}
};
Expand Down

0 comments on commit df2c677

Please sign in to comment.