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

ENG-6200: Turn client timeout into a response header timeout #138

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

erickpintor
Copy link
Contributor

Go's HTTP client timeout comprehends both getting the response headers and reading its body. However, for streaming, the HTTP body will never stop coming until there's a network error or the connection is closed. Moreover, normal on queries, if the body was produced by the server, it's on the client's best interest to receive it, IMO. Therefore, I'm proposing that we change the timeout handling to the transport's response header timeout so that we can use the same client for both query and streaming.

Copy link
Collaborator

@pnwpedro pnwpedro left a comment

Choose a reason for hiding this comment

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

little nits... 😅

client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
@erickpintor erickpintor force-pushed the streaming-http-timeout branch from 6bc1e60 to 3e76a79 Compare April 22, 2024 17:07
@erickpintor erickpintor merged commit 155ed97 into streaming Apr 23, 2024
4 checks passed
@erickpintor erickpintor deleted the streaming-http-timeout branch April 23, 2024 15:29
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