We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Am I correct to assume that server IdleTimeout argument can be used for context WithTimeout 'timeout' argument?
IdleTimeout
WithTimeout
Thanks
srv := &http.Server{Addr: ":8080", Handler: nil, IdleTimeout: 10} // Graceful server shutdown steps handled here on .... .... ctx, cancel := context.WithTimeout(context.Background(), srv.IdleTimeout*time.Second) defer cancel() .... ....
go version go1.13.1 darwin/amd64
The text was updated successfully, but these errors were encountered:
Please see https://github.com/golang/go/wiki/Questions for a list of places to seek help. Closing.
Sorry, something went wrong.
No branches or pull requests
Hi,
Am I correct to assume that server
IdleTimeout
argument can be used for contextWithTimeout
'timeout' argument?Thanks
The text was updated successfully, but these errors were encountered: