mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
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:
2
index.js
2
index.js
@@ -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));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user