Skip to content

Commit

Permalink
grpcproxy: return nil on receiving snapshot EOF
Browse files Browse the repository at this point in the history
Gets "code = OutOfRange desc = EOF" errors otherwise.
  • Loading branch information
Anthony Romano committed Jul 18, 2017
1 parent e6d2b31 commit dbd16d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proxy/grpcproxy/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package grpcproxy

import (
"io"

"golang.org/x/net/context"

"github.com/coreos/etcd/clientv3"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dbd16d5

Please sign in to comment.