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

Ensure websockets and http responses are closed if the future is canceled #4729

Closed
shawkins opened this issue Jan 4, 2023 · 0 comments · Fixed by #4732
Closed

Ensure websockets and http responses are closed if the future is canceled #4729

shawkins opened this issue Jan 4, 2023 · 0 comments · Fixed by #4732
Milestone

Comments

@shawkins
Copy link
Contributor

shawkins commented Jan 4, 2023

Related to #4726 and #4720 there was an assumption made based upon the jdk implementation that canceling the returned future from buildAsync or consumeBytes would close the the underlying resource if it occurred before the result were delivered. However our intervening logic means that we're dealing with a downstream future that is canceled - the upstream will still complete normally and could leak the connection. This will only happen in cases where the user manually closes something like a watch or a port forward before it initially completes.

shawkins added a commit to shawkins/kubernetes-client that referenced this issue Jan 4, 2023
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Jan 11, 2023
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Jan 11, 2023
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Jan 12, 2023
@manusa manusa added this to the 6.4.0 milestone Jan 13, 2023
manusa pushed a commit that referenced this issue Jan 13, 2023
#4732)

* fix #4729: completablefuture cancel will close the underlying resource

* fix #4729: expanding to sendAsync
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 a pull request may close this issue.

2 participants