From c359ddf43ccef7e8da91bb3a9918229a7d8ccad1 Mon Sep 17 00:00:00 2001
From: Ladicle <Ladiclexxx@gmail.com>
Date: Thu, 9 Mar 2017 16:38:17 +0900
Subject: [PATCH] helm(version): set 5 seconds timeout

close #1972
---
 pkg/helm/client.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/helm/client.go b/pkg/helm/client.go
index 03df61c6d..2e773cca7 100644
--- a/pkg/helm/client.go
+++ b/pkg/helm/client.go
@@ -18,6 +18,7 @@ package helm // import "k8s.io/helm/pkg/helm"
 
 import (
 	"io"
+	"time"
 
 	"golang.org/x/net/context"
 	"google.golang.org/grpc"
@@ -360,7 +361,7 @@ func (h *Client) content(ctx context.Context, req *rls.GetReleaseContentRequest)
 
 // Executes tiller.GetVersion RPC.
 func (h *Client) version(ctx context.Context, req *rls.GetVersionRequest) (*rls.GetVersionResponse, error) {
-	c, err := grpc.Dial(h.opts.host, grpc.WithInsecure())
+	c, err := grpc.Dial(h.opts.host, grpc.WithInsecure(), grpc.WithTimeout(5*time.Second), grpc.WithBlock())
 	if err != nil {
 		return nil, err
 	}
-- 
GitLab