carterkozak opened a new pull request, #371: URL: https://github.com/apache/httpcomponents-client/pull/371
Previously, a partially consumed response body closed via CloseableHttpResponse.close or HttpEntity.close would fully consume remaining bytes (via close), however it would not release the connection for reuse. If CloseableHttpResponse.close was called, it would follow the close with a discard/disconnect, however if only the entity was closed, the connection would remain in a checked-out (leaked) state. Now, we take advantage of the fact that closing a response stream on any reusable connection is required to drain bytes on closure. Failures are detected by writeTo and the stream returned by getContent, so we can be confident that we will not return a broken connection to the pool. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
