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

Read and close PrepareRequest response body #149

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

kke
Copy link
Contributor

@kke kke commented Dec 27, 2023

HTTP response's body should always be read and closed even if it's not used. The PrepareRequest function in encryption.go did not do that. This prevents the http client from reusing the same TCP connection to send the next request and a new one is opened, leaving the old one hanging.

@masterzen
Copy link
Owner

I'm wondering if that wouldn't fix #142 .

Copy link
Owner

@masterzen masterzen left a comment

Choose a reason for hiding this comment

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

LGTM

@masterzen masterzen merged commit 09681c6 into masterzen:master Dec 27, 2023
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