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

disconnect event not sent for more than one client #45

Closed
jannschu opened this issue Jun 10, 2011 · 6 comments
Closed

disconnect event not sent for more than one client #45

jannschu opened this issue Jun 10, 2011 · 6 comments

Comments

@jannschu
Copy link
Contributor

Hi,

following situation: there are two (ore more) clients connected via xhr-multipart (Firefox 4 here).
The first client disconnects and after the timeout the first disconnect message is sent.
Then the second client disconnects and the second disconnect message is sent.

But if both disconnect together at nearly the same time (closing both tabs) only one event is triggered.
At least in 5 of 6 tries.

I hope this is reproducible.

@ferd
Copy link
Collaborator

ferd commented Jun 11, 2011

I have a few ideas on this. First of all, is it something that looks a bit like [https://github.com//issues/42](issue 42)? In this case, entire queries are dropped, but it might be something similar.

It had a similar behaviour, and I think it has to do with how a query is handled or keepalive/pipelining. If you can give us some more details about what you're doing (or even demo code), I could try to see and confirm if it might be similar at some point in the very near future (a bit busy these days).

@jannschu
Copy link
Contributor Author

I will build a small demo tomorrow.

@jannschu
Copy link
Contributor Author

Here is the demo: http://pastie.org/2055824
Put these files into /demo/. Interesting fact: In line 33 (demo.erl) messages are sent to clients which aren't connected anymore. This line is necessary for the demo.

Edit: Firefox 4 produced some JavaScript errors, so I suggest to use Safari.

@ferd
Copy link
Collaborator

ferd commented Jun 15, 2011

I've got an idea of what's happening. We've got a bug report related to socket.io stuff by another guy, this time with websockets. This has to do with how we're handling timers and timeout events.

I'll be rewriting the timeouts for all the events tonight and this should hopefully fix the issue.

@ferd
Copy link
Collaborator

ferd commented Jun 17, 2011

Let me know if this still happens after the merge for now.

@jannschu
Copy link
Contributor Author

It's working now, thank you!

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