Skip to content

Commit

Permalink
clientv3: deprecate grpc.ErrClientConnTimeout errors
Browse files Browse the repository at this point in the history
Replace with context.DeadlineExceeded.
Address etcd-io#8504.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Sep 5, 2017
1 parent 9a84c84 commit 312c68a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clientv3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (c *Client) dial(endpoint string, dopts ...grpc.DialOption) (*grpc.ClientCo
if err != nil {
if toErr(ctx, err) != rpctypes.ErrAuthNotEnabled {
if err == ctx.Err() && ctx.Err() != c.ctx.Err() {
err = grpc.ErrClientConnTimeout
err = context.DeadlineExceeded
}
return nil, err
}
Expand Down Expand Up @@ -397,7 +397,7 @@ func newClient(cfg *Config) (*Client, error) {
case <-waitc:
}
if !hasConn {
err := grpc.ErrClientConnTimeout
err := context.DeadlineExceeded
select {
case err = <-client.dialerrc:
default:
Expand Down

0 comments on commit 312c68a

Please sign in to comment.