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); } };