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

Plumb contexts through transport.New #834

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

jonjohnsonjr
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr commented Nov 17, 2020

Fixes #832

Add transport.NewWithContext.

Use the provided context for the initial ping request and token
exchange.

Subsequent token exchanges (to refresh) will use the context of the
incoming request in RoundTrip.

Drop the hardcoded ping timeout.

Use transport.NewWithContext everywhere that's easily plumbable.

@jonjohnsonjr
Copy link
Collaborator Author

cc @CodingJzy this will revert #808 and use the context from remote.WithContext for most cases, just FYI.

Add transport.NewWithContext.

Use the provided context for the initial ping request and token
exchange.

Subsequent token exchanges (to refresh) will use the context of the
incoming request in RoundTrip.

Drop the hardcoded ping timeout.

Use transport.NewWithContext everywhere that's easily plumbable.
@likhita-8091
Copy link
Contributor

cc @CodingJzy,这将还原#808并在remote.WithContext大多数情况下使用FYI中的上下文。

thank you,Your way of passing in the context parameter is correct. I just discovered the problem, and then temporarily added a 2s timeout, which did not fundamentally solve the problem.

@jonjohnsonjr
Copy link
Collaborator Author

Thanks for making us aware of the problem @CodingJzy 😃

@jonjohnsonjr jonjohnsonjr merged commit 3904ad8 into google:master Nov 18, 2020
@jonjohnsonjr jonjohnsonjr deleted the timeout branch November 18, 2020 16:47
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.

regression: crane Client.Timeout exceeded between v0.1.4 and go get version
3 participants