I never see the "socket ctx =>" log when I do this, but my socket.on('someEvent') does, indeed fire. So I know the event is getting handled.. but the middleware never fires.
odd.. I cloned this project directly, modified the example to have a middleware on the chat namespace.. and it worked fine.. must be something to do w/ my code.. :-/
I can't seem to get middleware to work when using namespaced connections.
I never see the "socket ctx =>" log when I do this, but my
socket.on('someEvent')
does, indeed fire. So I know the event is getting handled.. but the middleware never fires.I also noticed that this feature is used on the unnamespaced connection (
io.use()...
), but not on the namespaced connection (chat.use()...
), in the example (https://github.com/ambelovsky/koa-socket-2/blob/master/example/server.js#L88). So maybe there's a bug?