grpcproxy: fix "grpc.ErrClientConnClosing" handling
Fix
```
go test -v -tags cluster_proxy -run TestWatchErrConnClosed
```
with gRPC >= v1.10
@@ -20,10 +20,8 @@ import (
"sync"
"github.com/coreos/etcd/clientv3"
- "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"golang.org/x/time/rate"
- "google.golang.org/grpc"
)
const (
@@ -69,7 +67,7 @@ func (l *leader) recvLoop() {
}
if cresp.Err() != nil {
l.loseLeader()
- if rpctypes.ErrorDesc(cresp.Err()) == grpc.ErrClientConnClosing.Error() {
+ if clientv3.IsConnCanceled(cresp.Err()) {
close(l.disconnc)
return
}
