Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(retry): Close response body after retry #180

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

HsinDumas
Copy link

大部分的IO Exception 都是没有 response body,但是在有些异常场景下是有的

比如 response 的 header 中有 Content-Encoding = gzip

但是实际的 body 却已经解压过,就会出现下面的异常

java.io.IOException: gzip finished without exhausting source

Close the response body after retrying to avoid resource leaks.
This ensures that the response body is properly released and
prevented from being kept in memory for an extended period,
potentially causing issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants