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 unclosed socket warning caused by RequestsFetcher #1302

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

sechkova
Copy link
Contributor

Description of the changes being introduced by the pull request:

Close the Response object when an HTTP error is raised.

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Close the Response object when an HTTP error is raised.

Signed-off-by: Teodora Sechkova <[email protected]>
@sechkova sechkova requested a review from jku March 11, 2021 09:33
@sechkova
Copy link
Contributor Author

sechkova commented Mar 11, 2021

I also opened #1303 as a requests for further improvement.

Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this is correct. Would be great if we could somehow use the response as a contextmanager but ... I don't think it's possible considering we want the chunks()-generator to own and finally close the response.

So LGTM.

@jku jku merged commit 2c360d0 into theupdateframework:develop Mar 12, 2021
@sechkova sechkova deleted the unclosed_socked branch March 25, 2021 13:18
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