Skip to content

Commit

Permalink
util/etcd: workaround for upstream cancellation problem
Browse files Browse the repository at this point in the history
Seems like grpc/grpc-go#2733 has resulted
in behaviour where any attempt to gRPC dial with a timeout gives
a cancelled-context error.
  • Loading branch information
daviddrysdale committed Apr 3, 2019
1 parent 935d46a commit c2760b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions util/etcd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ import (
// the same version of etcd in external codebases. Could Go modules help?
func NewClient(endpoints []string, dialTimeout time.Duration) (*clientv3.Client, error) {
return clientv3.New(clientv3.Config{
Endpoints: endpoints,
DialTimeout: dialTimeout,
Endpoints: endpoints,
// TODO(daviddrysdale): re-enable dial timeout when upstream client code fixed
// for https://github.com/grpc/grpc-go/pull/2733/files#r271705181
// DialTimeout: dialTimeout,
})
}

Expand Down

0 comments on commit c2760b4

Please sign in to comment.