express-socket.io-session
express-socket.io-session copied to clipboard
With express-socket.io-session module stopped to receive io connections
After adding this code to Express app initialization
io.use(sharedsession(session, {
autoSave:true
}));
io.on('connection', function(socket) { ... }
stopped to receive connections at all. Forced to use this solution: https://stackoverflow.com/a/25618636/630169 for now.
I have exactly the same problem ... and we are 2 years later .. Thank you very much for the workaround !
@akontsevich I have a question.
When you are using express-session with socket.io.
- are the session.id of the user be the same everytime it reconnects (e.g. reload the browser)?
- is the socket.session.id suppose to be the same as express req.session.id?
I'm asking because my ID is not persistent with all the solutions on stackoverflow ive seen (including the one you mentioned).
@daveteu it was a long time ago, I do not know for now.