Skip to content

Commit

Permalink
clientv3: use DialContext
Browse files Browse the repository at this point in the history
Fixes #7216
  • Loading branch information
Anthony Romano committed Jan 24, 2017
1 parent 90f6a4a commit 1dadb22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clientv3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ func (c *Client) dialSetupOpts(endpoint string, dopts ...grpc.DialOption) (opts
return nil, c.ctx.Err()
default:
}
return net.DialTimeout(proto, host, t)
dialer := &net.Dialer{Timeout: t}
return dialer.DialContext(c.ctx, proto, host)
}
opts = append(opts, grpc.WithDialer(f))

Expand Down

0 comments on commit 1dadb22

Please sign in to comment.