helidon icon indicating copy to clipboard operation
helidon copied to clipboard

WebClient connection is not properly returned to the pool

Open Verdent opened this issue 10 months ago • 0 comments

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

  1. Let WebClient handle the response as JsonObject type from JSON-P
  2. 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.

Verdent avatar Apr 19 '24 11:04 Verdent