Skip to content

Commit

Permalink
do not use global timeout flag if server
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Oct 6, 2016
1 parent a0012ea commit 825b616
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cmd/cli/cmd/version.go
Expand Up @@ -72,7 +72,11 @@ func (o *VersionOptions) Complete(cmd *cobra.Command, f *clientcmd.Factory, out
}

// apply global timeout, if zero, apply custom 10s timeout
o.Timeout = kcmdutil.GetFlagDuration(cmd, "request-timeout")
o.Timeout = 0
if !o.IsServer {
// "request-timeout" option is only available to cli sub-commands
o.Timeout = kcmdutil.GetFlagDuration(cmd, "request-timeout")
}
if o.Timeout == 0 {
o.Timeout = time.Duration(10 * time.Second)
}
Expand Down

0 comments on commit 825b616

Please sign in to comment.