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

httpclient.Do forces closes connection #133

Open
rajat25 opened this issue Aug 25, 2022 · 0 comments
Open

httpclient.Do forces closes connection #133

rajat25 opened this issue Aug 25, 2022 · 0 comments

Comments

@rajat25
Copy link

rajat25 commented Aug 25, 2022

httpclient.Do forces closes connection whereas hystrix.Do doesn't.
I am using httpclient.Do in my project, due to which my connection is forced closed after every request.

func (c *Client) Do(request *http.Request) (*http.Response, error) {

	request.Close = true
	var bodyReader *bytes.Reader

request.Close = true above closes the connection.

Edit:
I see that a PR #122 is raised to fix this but it is not yet merged. Can this be merged please?

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

No branches or pull requests

1 participant