Skip to content

Commit 3c7350f

Browse files
committed
Merge pull request #2509 from tw0517tw/patch-1
stop prepend /# before id when no namespace
2 parents aadd5da + 6d41287 commit 3c7350f

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
@@ -59,7 +59,7 @@ function Socket(nsp, client){
5959
this.nsp = nsp;
6060
this.server = nsp.server;
6161
this.adapter = this.nsp.adapter;
62-
this.id = nsp.name + '#' + client.id;
62+
this.id = nsp.name !== '/' ? nsp.name + '#' + client.id : client.id;
6363
this.client = client;
6464
this.conn = client.conn;
6565
this.rooms = {};

0 commit comments

Comments
 (0)