Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Properly close the Apache response so that connections can be reused #3752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agherardi
Copy link
Contributor

No description provided.

@agherardi
Copy link
Contributor Author

@agherardi
Copy link
Contributor Author

See http://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/fundamentals.html#d5e145

In order to ensure proper release of system resources one must close either the content stream associated with the entity or the response itself
The difference between closing the content stream and closing the response is that the former will attempt to keep the underlying connection alive by consuming the entity content while the latter immediately shuts down and discards the connection.

@agherardi agherardi force-pushed the properlyClose branch 2 times, most recently from 4e59ad3 to 588b4e8 Compare January 10, 2018 17:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants