Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f72dd3

Browse files
committed
Merge pull request socketio#2063 from kapouer/patch-1
Let adapter.add find connected socket
2 parents d0d3822 + 4254099 commit 3f72dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ Socket.prototype.leaveAll = function(){
277277

278278
Socket.prototype.onconnect = function(){
279279
debug('socket connected - writing packet');
280+
this.nsp.connected[this.id] = this;
280281
this.join(this.id);
281282
this.packet({ type: parser.CONNECT });
282-
this.nsp.connected[this.id] = this;
283283
};
284284

285285
/**

0 commit comments

Comments
 (0)