eclipse-ee4j / eclipse-ee4j/jersey
ApacheConnector's breaks any connecting pool by always forcing all connections to be close and not released back to the pool.
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
The PR/change introduced in #3124 causes connection pooling to break.
When response.close()([https://github.com/jersey/jersey/commit/0d1326dee69d9c693014184bea3e4a44b323daee#diff-91ece5335d0cdc9321a099df1caec54fR643](https://github.com/jersey/jersey/commit/0d1326dee69d9c693014184bea3e4a44b323daee#diff-91ece5335d0cdc9321a099df1caec54fR643)) is called this causes Apache HttpClient to not release the connection back to the pool but close it instead.
The flow is:
HttpClientResponseInputStream.close() -> CloseableHttpResponse.close() -> HttpResponseProxy.close() -> ConnectionHolder.close() -> ConnectionHolder.releaseConnection(false)….
releaseConnection(false) causes the underlying connection to be closed and not released back to the pool for reuse.
#### Affected Versions
[2.25.1]
Contributor guide
Assessment
This issue has not been assessed yet.