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

add client request timeout #1085

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

rphillips
Copy link

does the http.Client ever get a timeout attached to it for requests that timeout? Or would the server timeout the request?

Copy link
Contributor

@ericchiang ericchiang left a comment

Choose a reason for hiding this comment

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

Mind also adding a net.Dialer Deadline field above?

client: &http.Client{Transport: t},
client: &http.Client{
Transport: t,
Timeout: 30 * time.Second,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this shorter? e.g. 15 seconds. There's no reason any of these requests should take 30 seconds.

@ericchiang
Copy link
Contributor

Or would the server timeout the request?

we definitely don't want to depend on the server to time it out even if it will.

Copy link
Contributor

@ericchiang ericchiang left a comment

Choose a reason for hiding this comment

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

lgtm, waiting for CI.

@ericchiang ericchiang merged commit 0aabf2d into dexidp:master Sep 27, 2017
@rphillips rphillips deleted the fixes/http_client_timeout branch September 28, 2017 13:50
mmrath pushed a commit to mmrath/dex that referenced this pull request Sep 2, 2019
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.

None yet

2 participants