From 6d4128750bd47d7f16aee3d098916af8106642d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E6=9D=B1=E6=9B=84=20Wu=2C=20Dung-Ie?= Date: Fri, 1 Apr 2016 17:09:06 +0800 Subject: [PATCH] stop append /# before id when no namespace --- lib/socket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = {};