grpcproxy: return nil on receiving snapshot EOF
Gets "code = OutOfRange desc = EOF" errors otherwise.
package grpcproxy
import (
+ "io"
+
"golang.org/x/net/context"
"github.com/coreos/etcd/clientv3"
@@ -49,6 +51,9 @@ func (mp *maintenanceProxy) Snapshot(sr *pb.SnapshotRequest, stream pb.Maintenan
for {
rr, err := sc.Recv()
if err != nil {
+ if err == io.EOF {
+ return nil
+ }
return err
}
err = stream.Send(rr)
