Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Session update #586

Closed
JonnyBGod opened this issue Oct 19, 2011 · 1 comment
Closed

Session update #586

JonnyBGod opened this issue Oct 19, 2011 · 1 comment

Comments

@JonnyBGod
Copy link

Hi,

I ran into a problem with sessions within socket.io.

Everything works as sopposed until a users logs in... Problem is that changing the session like example:

app.get('log/:id?', function(req, res){
...
req.session.auth.userId = user.id;
});

and then if client send a message:

socket.on('message', function(message){
console.log(hs.session.auth.user.ID);
});

Problem is that the session has not changed. Actually it only changes after a couple of seconds (sometimes several seconds).

Any idea of whats causing this? Any way to update the socket session at the same time as the express session?

Thank you in advance.
Joao Ribeiro

@3rd-Eden
Copy link
Contributor

This is not issue, but more a question, please post it http://groups.google.com/group/socket_io/ instead, so we can keep this to focus on real bugs socket.io.

Thanks <3

darrachequesne pushed a commit that referenced this issue Jul 8, 2024
These additional messages will help more quickly diagnose the reason for error messages.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants