Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Close okhttp response #1073

Merged
merged 1 commit into from
Apr 18, 2023
Merged

Close okhttp response #1073

merged 1 commit into from
Apr 18, 2023

Conversation

honnix
Copy link
Member

@honnix honnix commented Apr 18, 2023

Hey, I just made a Pull Request!

Description

Close okhttp response for requests we don't expect response body payload.

Motivation and Context

An OKHttp response must be closed (as explained here). For those requests we expect body payload, we read the body stream which results in close automatically, but for those we don't expect response body payload, currently we are not closing the response, which for some condition results in leaving threads hanging around.

Have you tested this? If so, how?

Existing tests.

Checklist for PR author(s)

  • Changes are covered by unit test
  • All tests pass
  • Code coverage check passes
  • Error handling is tested
  • Errors are handled at the appropriate layer
  • Errors that cannot be handled where they occur are propagated
  • (optional) Changes are covered by system test
  • Relevant documentation updated
  • This PR has NO breaking change to public API
  • This PR has breaking change to public API and it is documented

Checklist for PR reviewer(s)

  • This PR has been incorporated in release note for the coming version
  • Risky changes introduced by this PR have been all considered

@honnix honnix merged commit 4b18e85 into master Apr 18, 2023
@honnix honnix deleted the close-response branch April 18, 2023 08:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants