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 OkHttp3ClientHttpRequestFactory shutdown flow #23628

Conversation

alexey-anufriev
Copy link
Contributor

This fix now triggers closing and removing all idle connections inside the connection pool used by OkHttpClient.

The problem was discovered after switching from Java 8 to Java 11 and consequently to HTTP/2.

The recommendation from OkHttp developer was a proper shutdown:
square/okhttp#5446

Problem can be reproduced with this snippet of code:
alexey-anufriev/okhttpclient-shutdown-problem@29abbda#diff-70a5fa50b52c03a98de3a02c98de30a1

This fix now triggers closing and removing all idle connections
inside connection pool used by OkHttpClient.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 12, 2019
@alexey-anufriev
Copy link
Contributor Author

Anyone? Is there a chance to get this merged?

@rstoyanchev rstoyanchev self-assigned this Nov 1, 2019
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Nov 1, 2019
@rstoyanchev rstoyanchev added this to the 5.2.1 milestone Nov 1, 2019
@rstoyanchev rstoyanchev removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 1, 2019
pull bot pushed a commit to scope-demo/spring-framework that referenced this pull request Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants