OpenFeign / OpenFeign/feign

ApacheHttpClient unreleased socket

Open
#1,286 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

the Openfeign client - ApacheHttpClient - does not explicitly close the socket connection after reading the http response.
The recommended approach according to the examples specified in the Apache HttpComponents is to explicitly call CloseableHttpResponse#close() from a finally clause.
Example from apache readme

This might lead to resource leaks due to unreleased socket resources in the event of errors and other exception scenarios.

after reading the response the program should explicitly close the socket

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in httpclient/src/main/java/feign/httpclient/ApacheHttpClient.java at the response handling around line 169, and compare it with the Apache HttpComponents close-response example linked in the issue. Done means the response explicitly closes on normal and exception paths; validate the change with the HTTP client tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.