From 43f74274077f4ec0c24898e19cdde5cc5f886acd Mon Sep 17 00:00:00 2001 From: Marcel Chastain Date: Sat, 18 Jul 2015 19:20:19 -0700 Subject: [PATCH] add support for namespace authentication fixes #32 --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 4c66b66..986fa0d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -53,7 +53,8 @@ function noQsMethod(options) { if (server.$emit) { server.$emit('authenticated', socket); } else { - server.server.sockets.emit('authenticated', socket); + // explicit namespace + server.server.nsps[socket.nsp.name].emit('authenticated', socket); } };