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

onConnectionClosed firing multiple times and connecting more than once (server restart) #57

Closed
philstrong opened this issue Apr 7, 2016 · 7 comments · Fixed by philstrong/eventsource#1

Comments

@philstrong
Copy link
Contributor

onConnectionClosed is called for connection close and end.

connect is called twice
the first connect makes a request but before it can get a response
the 2nd connect is called. In both states readyState is CONNECTING
the 2nd connect makes a request
the first connect now gets a response and is connected
the 2nd connect now gets a response and is connected

restart the server again (we now get 4 connects) and this perpetuates.

@philstrong
Copy link
Contributor Author

I merged this in my fork but still needs consideration for aslakhellesoy/eventsource

@elado
Copy link

elado commented Jul 21, 2016

👍

@lanwin
Copy link

lanwin commented Sep 4, 2016

Is there a reason why this still isnt merged?

@aslakhellesoy
Copy link
Contributor

aslakhellesoy commented Sep 4, 2016

The reaon @lanwin is that I tend to prioritise paid work (this is not). I prioritise open source work when I need it myself, or if I happen to be in the right mood, with some spare time.

Thanks for the reminder though.

@yinzer
Copy link

yinzer commented Nov 16, 2016

With 57,090 downloads in the last day one would think something like this might get a little more attention

@tobilg
Copy link

tobilg commented Nov 22, 2016

Thanks @aslakhellesoy for your work on this project. I think @yinzer is kind of correct. I also see the double-reconnect behavior (there are two "real" connections instead of one) once the SSE server is restarted.

This can be more or less a showstopper for this module IMO.

@philstrong
Copy link
Contributor Author

open source is hard! ;p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants