helidon
helidon copied to clipboard
WebClient connection is not properly returned to the pool
Environment Details
- Helidon Version: 4.x
- Helidon SE or Helidon MP
- JDK version:
- OS:
- Docker version (if applicable):
Problem Description
Http1ClientResponseImpl
field entityFullyRead
is never set to true and because of that response close method closes connection as well. If response is handled as a String, everything works as expected.
Steps to reproduce
- Let WebClient handle the response as JsonObject type from JSON-P
- Connection is always closed ofter this, even thought it is reusable.
Possible solution:
Add method close()
to the ReadableEntityBase.EntityProcessedRunnable
class. This method could have similar logic as ReadableEntityBase.RequestingInputStream#ensureBuffer
does.