Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Meteor.logout() in IE8/9 does not change online status immediately #10

Closed
jimjamjoh opened this issue Jan 2, 2014 · 2 comments
Closed

Comments

@jimjamjoh
Copy link

There is an observed delay of 30-60 seconds between calling Meteor.logout() on IE8 & IE9 browsers and the data record having status.online == "false".

See the Mongo query and two records below. The second record has no loginTokens immediately after a Meteor.logout() call in IE8 & IE9, but the online status is still "true". In 30-60 seconds, this record will have its online status change to "false", but I am unsure what event triggers this delayed change.

This bug does not affect Firefox or Chrome, where a call to Meteor.logout() immediately sets the online status to "false" as expected.

meteor:PRIMARY> db.users.find({'status.online': true}, {'services.resume.loginTokens': 1, 'status.online': 1})

{ "_id" : "KDtaASeBcRu95d54c", "services" : { "resume" : { "loginTokens" : [    {   "token" : "DAygECQnQ2SsGupcF",  "when" : ISODate("2014-01-02T21:27:51.960Z") } ] } }, "status" : { "online" : true } }
{ "_id" : "2rpis2ryT3g2iXbes", "services" : { "resume" : { "loginTokens" : [ ] } }, "status" : { "online" : true } }
@mizzao
Copy link
Collaborator

mizzao commented Jan 2, 2014

@jimjamjoh Just a guess at the moment, but IE8/9 probably uses a different SockJS implementation than on more recent browsers, and does not work with the publish functionality in the same way. Does it happen in IE10 too? Can you check if the publish function in the code is called immediately after the user logs out? If not, it may be something we should report as a bug upstream.

I'm not too worried about this edge case on what I consider a legacy browser, but if you can find a quick way to fix it, I'd be happy to take a PR. My guess is that it will be difficult though because we're using the close event on SockJS connections to detect logouts, and it may not be registering immediately and instead only on timeouts.

@mizzao
Copy link
Collaborator

mizzao commented Apr 23, 2014

Meteor has changed a lot of the underlying socket logic since you filed this. We now have a demo app at http://user-status.meteor.com/ which makes it easy to debug issues like this.

Since this bug could be outdated. I'm going to close for now. Can you give steps to reproduce this bug on that app? If so, we can reopen this issue.

@mizzao mizzao closed this as completed Apr 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants