From f1e2030ce874a9ac011bab3712af050d026bb7ef Mon Sep 17 00:00:00 2001 From: Anusha Ragunathan Date: Fri, 16 Feb 2018 12:00:58 -0800 Subject: [PATCH] Set a non-zero timeout for HTTP client communication with plugin backend. Currently, the timeout is set to 0, which means no timeout. Set it to a sane default timeout of 30 seconds. Signed-off-by: Anusha Ragunathan --- cli/command/plugin/enable.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/plugin/enable.go b/cli/command/plugin/enable.go index 33567643bf..ec051622cd 100644 --- a/cli/command/plugin/enable.go +++ b/cli/command/plugin/enable.go @@ -30,7 +30,7 @@ func newEnableCommand(dockerCli command.Cli) *cobra.Command { } flags := cmd.Flags() - flags.IntVar(&opts.timeout, "timeout", 0, "HTTP client timeout (in seconds)") + flags.IntVar(&opts.timeout, "timeout", 30, "HTTP client timeout (in seconds)") return cmd }