From 4065735845428e9d20e856d8d2d4fcc9598f5289 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 7 May 2018 14:22:54 -0700 Subject: [PATCH] clientv3: remove unused "dialerrc" Signed-off-by: Gyuho Lee --- clientv3/client.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/clientv3/client.go b/clientv3/client.go index d861ef27b..2dd37abbf 100644 --- a/clientv3/client.go +++ b/clientv3/client.go @@ -64,8 +64,7 @@ type Client struct { Auth Maintenance - conn *grpc.ClientConn - dialerrc chan error + conn *grpc.ClientConn cfg Config creds *credentials.TransportCredentials @@ -250,14 +249,7 @@ func (c *Client) dialSetupOpts(target string, dopts ...grpc.DialOption) (opts [] default: } dialer := &net.Dialer{Timeout: t} - conn, err := dialer.DialContext(c.ctx, proto, host) - if err != nil { - select { - case c.dialerrc <- err: - default: - } - } - return conn, err + return dialer.DialContext(c.ctx, proto, host) } opts = append(opts, grpc.WithDialer(f)) @@ -395,7 +387,6 @@ func newClient(cfg *Config) (*Client, error) { ctx, cancel := context.WithCancel(baseCtx) client := &Client{ conn: nil, - dialerrc: make(chan error, 1), cfg: *cfg, creds: creds, ctx: ctx,