Closed nazukin-dmitrii-sravni closed 2 months ago
When feign.Logger copies Response in method logAndRebufferResponse, it makes new instance of Response.Body, but it doesn't close original Response.Body. It only closes underlying InputStream in the next line. https://github.com/OpenFeign/feign/blob/9b9d74ff18f8a41a9fa9061cf56f62f62549bc94/core/src/main/java/feign/Logger.java#L128
logAndRebufferResponse
Looks like, it could be potential leak of resources/connections. What do you think?
For example Response.Body implementation for apache hc5 is never executed.
@Override public void close() throws IOException { try { EntityUtils.consume(entity); } finally { httpResponse.close(); }
When feign.Logger copies Response in method
logAndRebufferResponse
, it makes new instance of Response.Body, but it doesn't close original Response.Body. It only closes underlying InputStream in the next line. https://github.com/OpenFeign/feign/blob/9b9d74ff18f8a41a9fa9061cf56f62f62549bc94/core/src/main/java/feign/Logger.java#L128Looks like, it could be potential leak of resources/connections. What do you think?
For example Response.Body implementation for apache hc5 is never executed.