clientv3: use DialContext

Fixes #7216
release-3.2
Anthony Romano 2017-01-24 12:25:55 -08:00
parent a2c44a8b65
commit 56286ccd29
1 changed files with 2 additions and 1 deletions

View File

@ -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))