Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
9bac0a4c
Commit
9bac0a4c
authored
Feb 15, 2018
by
Johnny Bergström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update deprecated grpc dial timeout
The docs say: use DialContext instead.
parent
98e5006e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
client.go
pkg/helm/client.go
+3
-2
No files found.
pkg/helm/client.go
View file @
9bac0a4c
...
@@ -307,7 +307,6 @@ func (h *Client) PingTiller() error {
...
@@ -307,7 +307,6 @@ func (h *Client) PingTiller() error {
// are constructed here.
// are constructed here.
func
(
h
*
Client
)
connect
(
ctx
context
.
Context
)
(
conn
*
grpc
.
ClientConn
,
err
error
)
{
func
(
h
*
Client
)
connect
(
ctx
context
.
Context
)
(
conn
*
grpc
.
ClientConn
,
err
error
)
{
opts
:=
[]
grpc
.
DialOption
{
opts
:=
[]
grpc
.
DialOption
{
grpc
.
WithTimeout
(
5
*
time
.
Second
),
grpc
.
WithBlock
(),
grpc
.
WithBlock
(),
grpc
.
WithKeepaliveParams
(
keepalive
.
ClientParameters
{
grpc
.
WithKeepaliveParams
(
keepalive
.
ClientParameters
{
// Send keepalive every 30 seconds to prevent the connection from
// Send keepalive every 30 seconds to prevent the connection from
...
@@ -322,7 +321,9 @@ func (h *Client) connect(ctx context.Context) (conn *grpc.ClientConn, err error)
...
@@ -322,7 +321,9 @@ func (h *Client) connect(ctx context.Context) (conn *grpc.ClientConn, err error)
default
:
default
:
opts
=
append
(
opts
,
grpc
.
WithInsecure
())
opts
=
append
(
opts
,
grpc
.
WithInsecure
())
}
}
if
conn
,
err
=
grpc
.
Dial
(
h
.
opts
.
host
,
opts
...
);
err
!=
nil
{
ctx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
5
*
time
.
Second
)
defer
cancel
()
if
conn
,
err
=
grpc
.
DialContext
(
ctx
,
h
.
opts
.
host
,
opts
...
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
return
conn
,
nil
return
conn
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment