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

EventSource still reconnected when closed #24

Merged
merged 2 commits into from
Sep 12, 2013

Conversation

FrozenCow
Copy link
Contributor

Following the specs a connection can be closed during reconnection-timeout: http://dev.w3.org/html5/eventsource/#reestablish-the-connection

EventSource did not do this at the moment, so it wasn't possible to 'cancel' a reconnect when a remote connection was closed.

Following the specs a connection can be closed during reconnection-timeout: http://dev.w3.org/html5/eventsource/#reestablish-the-connection

EventSource did not do this at the moment, so it wasn't possible to 'cancel' a reconnect when a remote connection was closed.
@aslakhellesoy
Copy link
Contributor

Thanks. Could you please add a test that fails without your change and passes with it?

@FrozenCow
Copy link
Contributor Author

Alright the test is added. It fails here for master and passes for patch-1. I've used a timeout of 100ms, but that might be too much... I just used a high value to be sure it's ran correctly.

@aslakhellesoy aslakhellesoy merged commit bcd3775 into EventSource:master Sep 12, 2013
@aslakhellesoy
Copy link
Contributor

Thanks - I have merged this.

Unrelated to your fix - after I merged your patch I had some failing tests locally because last I ran them I was on an older version of Node, but now I'm on Node 0.10.18. I made some changes until all my tests were passing locally again.

I changed the Travis config to build on 0.10.18 as well, but unfortunately Travis doesn't agree with my local machine and fails 5 tests: https://travis-ci.org/aslakhellesoy/eventsource-node

Long story short - I don't want to release until Travis is green.

Are all tests passing for you on 0.10.18 or do you see what Travis see? It would be help to get some help to reproduce (and fix) this.

@FrozenCow FrozenCow deleted the patch-1 branch September 12, 2013 15:41
@FrozenCow
Copy link
Contributor Author

I'm also running node v0.10.18 and for me the tests run without problems. v0.10.17 also worked fine, however I have not tried v0.10.12, which Travis seems to be running on.

I have reproduced the errors when using 0.10.12 by doing:

$ npm install -g n
$ n 0.10.12
$ PATH=$(n bin 0.10.12):$PATH bash
$ cd ~/projects/eventsource-node
$ npm test

It seems this issue was fixed in node between 0.10.12 and 0.10.17. Maybe you should just let Travis build for a older of node (v0.8.25)? I'm not sure how to fix the issue.

@aslakhellesoy
Copy link
Contributor

Thanks - I fixed it here: bbaeb2f

I'm watching nodejs/node-v0.x-archive#5439 - when it's fixed we should be able to let Travis run more recent versions of Node.

@FrozenCow
Copy link
Contributor Author

Sounds good. That issue is talking about v0.10.5, so I guess there is a range of versions of node affected (v0.10.5 till at least v0.10.12). I don't mind waiting a for Travis to upgrade before a new release of EventSource.

@aslakhellesoy
Copy link
Contributor

I already released!

@FrozenCow
Copy link
Contributor Author

Oh awesome, thanks!

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

Successfully merging this pull request may close these issues.

2 participants