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

httpproxy: cancel requests when client closes a connection #9336

Merged
merged 1 commit into from
Feb 18, 2018

Conversation

rkd-msw
Copy link
Contributor

@rkd-msw rkd-msw commented Feb 18, 2018

This change fixes #9335. I've:

  • run the repro scenario described in that issue and confirmed that filehandles aren't leaked
  • added a temporary log to confirm that io.Copy does now exit (so we don't leak a goroutine)
  • checked that it is safe to call cancel() repeatedly (https://golang.org/pkg/context/#CancelFunc - "After the first call, subsequent calls to a CancelFunc do nothing.")

@xiang90
Copy link
Contributor

xiang90 commented Feb 18, 2018

lgtm

@rkd-msw
Copy link
Contributor Author

rkd-msw commented Feb 18, 2018

Thanks! Is there anything special I need to do to get this fix into the v3.2 release stream? A v3.2.17 with this fix in would be really useful to us.

@gyuho
Copy link
Contributor

gyuho commented Feb 21, 2018

^ @jpbetz

We have a few other PRs to backport for 3.3 as well.

gyuho added a commit that referenced this pull request Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Timing out HTTP requests via the etcd proxy causes leaked HTTP connections
3 participants