We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f3ab0a commit 07c846cCopy full SHA for 07c846c
client/nginx.go
@@ -591,7 +591,9 @@ func WithCheckAPI() Option {
591
// WithMaxAPIVersion sets the API version to the max API version.
592
func WithMaxAPIVersion() Option {
593
return func(o *NginxClient) {
594
- version, err := o.GetMaxAPIVersion()
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
595
+ defer cancel()
596
+ version, err := o.GetMaxAPIVersion(ctx)
597
if err != nil {
598
return
599
}
0 commit comments