VOL-1460 Updated core to use voltha-protos instead of local protos
Moved protos to python directory in order to maintain functionaly of containers built there.
Added capability to do local builds of protos
Added instructions on running dep ensure for getting protos.
Updated github.com/golang/protobuf version to v1.3.1
Change-Id: Ia6ef55f07f0d5dcb5b750d7c37b21b71db85bfc4
diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go
index 14f915d..a2575c9 100644
--- a/vendor/google.golang.org/grpc/picker_wrapper.go
+++ b/vendor/google.golang.org/grpc/picker_wrapper.go
@@ -101,10 +101,7 @@
// - the subConn returned by the current picker is not READY
// When one of these situations happens, pick blocks until the picker gets updated.
func (bp *pickerWrapper) pick(ctx context.Context, failfast bool, opts balancer.PickOptions) (transport.ClientTransport, func(balancer.DoneInfo), error) {
- var (
- p balancer.Picker
- ch chan struct{}
- )
+ var ch chan struct{}
for {
bp.mu.Lock()
@@ -130,7 +127,7 @@
}
ch = bp.blockingCh
- p = bp.picker
+ p := bp.picker
bp.mu.Unlock()
subConn, done, err := p.Pick(ctx, opts)
@@ -144,15 +141,22 @@
continue
}
return nil, nil, status.Errorf(codes.Unavailable, "%v, latest connection error: %v", err, bp.connectionError())
+ case context.DeadlineExceeded:
+ return nil, nil, status.Error(codes.DeadlineExceeded, err.Error())
+ case context.Canceled:
+ return nil, nil, status.Error(codes.Canceled, err.Error())
default:
+ if _, ok := status.FromError(err); ok {
+ return nil, nil, err
+ }
// err is some other error.
- return nil, nil, toRPCErr(err)
+ return nil, nil, status.Error(codes.Unknown, err.Error())
}
}
acw, ok := subConn.(*acBalancerWrapper)
if !ok {
- grpclog.Infof("subconn returned from pick is not *acBalancerWrapper")
+ grpclog.Error("subconn returned from pick is not *acBalancerWrapper")
continue
}
if t, ok := acw.getAddrConn().getReadyTransport(); ok {