grpcproxy: return nil on receiving snapshot EOF

Gets "code = OutOfRange desc = EOF" errors otherwise.
This commit is contained in:
Anthony Romano 2017-07-18 15:04:41 -07:00
parent c5447c2ec9
commit 1dcae41b20

View File

@ -15,6 +15,8 @@
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)