diff --git a/lib/socket.js b/lib/socket.js index de5ebb7158..8d54b3efc7 100644 --- a/lib/socket.js +++ b/lib/socket.js @@ -59,7 +59,7 @@ function Socket(nsp, client){ this.nsp = nsp; this.server = nsp.server; this.adapter = this.nsp.adapter; - this.id = nsp.name + '#' + client.id; + this.id = nsp.name !== '/' ? nsp.name + '#' + client.id : client.id; this.client = client; this.conn = client.conn; this.rooms = {};