-
Notifications
You must be signed in to change notification settings - Fork 215
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
Support single connection for multiple request #104
Comments
you can use custom client: type client struct {
client *http.Client
transport http.RoundTripper
}
func (client *client) Do(request *http.Request) (*http.Response, error) {
request.Close = false //This will be prevent closing of tcp connection, heimdall sets this attribute on true
return client.client.Do(request) \
}
hystrix.NewClient(
hystrix.WithHTTPTimeout(30*time.Second),
hystrix.WithHTTPClient(NewClient())
) |
@lukas016 do u know why we close tcp connection after every request instead of reusing it? |
@komalasurya sorry, but i don't use or follow this project anymore. So if my comment above do problem you/i can deleted it. In my use cases i don't need close each connection to server, but heimdall wasn't very well for my use cases and comment above is from one of tests, when it works for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this library support using single connection for multiple request? So it doesn't need handshake process for every request
The text was updated successfully, but these errors were encountered: