Skip to content

Commit

Permalink
Merge pull request #8947 from gyuho/automated-cherry-pick-of-#8939-or…
Browse files Browse the repository at this point in the history
…igin-release-3.2

Automated cherry pick of #8939
  • Loading branch information
gyuho committed Dec 4, 2017
2 parents c142134 + 5921b2c commit 78fb932
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions etcdserver/api/v3rpc/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (ls *LeaseServer) leaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) erro
return nil
}
if err != nil {
plog.Warningf("failed to receive lease keepalive request from gRPC stream (%q)", err.Error())
return err
}

Expand All @@ -117,6 +118,7 @@ func (ls *LeaseServer) leaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) erro
resp.TTL = ttl
err = stream.Send(resp)
if err != nil {
plog.Warningf("failed to send lease keepalive response to gRPC stream (%q)", err.Error())
return err
}
}
Expand Down
4 changes: 4 additions & 0 deletions etcdserver/api/v3rpc/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (ws *watchServer) Watch(stream pb.Watch_WatchServer) (err error) {
// deadlock when calling sws.close().
go func() {
if rerr := sws.recvLoop(); rerr != nil {
plog.Warningf("failed to receive watch request from gRPC stream (%q)", rerr.Error())
errc <- rerr
}
}()
Expand Down Expand Up @@ -337,6 +338,7 @@ func (sws *serverWatchStream) sendLoop() {

mvcc.ReportEventReceived(len(evs))
if err := sws.gRPCStream.Send(wr); err != nil {
plog.Warningf("failed to send watch response to gRPC stream (%q)", err.Error())
return
}

Expand All @@ -353,6 +355,7 @@ func (sws *serverWatchStream) sendLoop() {
}

if err := sws.gRPCStream.Send(c); err != nil {
plog.Warningf("failed to send watch control response to gRPC stream (%q)", err.Error())
return
}

Expand All @@ -368,6 +371,7 @@ func (sws *serverWatchStream) sendLoop() {
for _, v := range pending[wid] {
mvcc.ReportEventReceived(len(v.Events))
if err := sws.gRPCStream.Send(v); err != nil {
plog.Warningf("failed to send pending watch response to gRPC stream (%q)", err.Error())
return
}
}
Expand Down

0 comments on commit 78fb932

Please sign in to comment.