A new room should be created as an object instead of an array since the id/true is set as a key value pair. Not an array element.

This commit is contained in:
chris_coniglio
2014-08-06 09:40:18 -07:00
parent 0b6a00cbec
commit ce93e2adaa

View File

@@ -44,7 +44,7 @@ Adapter.prototype.__proto__ = Emitter.prototype;
Adapter.prototype.add = function(id, room, fn){
this.sids[id] = this.sids[id] || {};
this.sids[id][room] = true;
this.rooms[room] = this.rooms[room] || [];
this.rooms[room] = this.rooms[room] || {};
this.rooms[room][id] = true;
if (fn) process.nextTick(fn.bind(null, null));
};