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

Fix multi connects #59

Closed
wants to merge 4 commits into from

Conversation

philstrong
Copy link
Contributor

No description provided.

@philstrong
Copy link
Contributor Author

Testing ongoing. Please wait for feedback on whether this solves our issue

@philstrong
Copy link
Contributor Author

So this isn't going to work due to the fact that if the connection doesn't happen on first attempt it simply does not work. We're removing the req.on('error', onConnectionClosed); as well.

I'm going to selectively remove end and close.

@aslakhellesoy
Copy link
Contributor

The tests control both the server and the client, so whatever situation you've run into it should be reproducible with a test.

I'm afraid I won't accept pull requests without tests.

@philstrong
Copy link
Contributor Author

Yeah I get it. See what I can do

@rrapant
Copy link

rrapant commented May 26, 2016

@philstrong I think a test that has the server return a redirect (307) will prove this out.

@aslakhellesoy
Copy link
Contributor

I'll close this PR soon unless someone adds tests for it

@anacronw
Copy link
Contributor

I'm running into the same issue. Basically, when the server drops the socket, both "close" and "event" fire. Since onConnectionClosed handler also does a connect, you double the number of connections.

Subsequently, when both connections are closed, that gets doubled again (4 connects) and so forth 2^x

@anacronw
Copy link
Contributor

anacronw commented Jun 23, 2016

Please look at my PR #61 for a test that exposes the bug

@philstrong
Copy link
Contributor Author

closed in favor of #61

@philstrong philstrong closed this Jun 27, 2016
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.

4 participants