Skip to content

Commit

Permalink
etcdserver: watch stream got closed once one request is not permitted (
Browse files Browse the repository at this point in the history
  • Loading branch information
polyrabbit committed Apr 6, 2020
1 parent c623f79 commit 3fde9e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion etcdserver/api/v3rpc/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ func (sws *serverWatchStream) recvLoop() error {
return err
}

requestHandler:
switch uv := req.RequestUnion.(type) {
case *pb.WatchRequest_CreateRequest:
if uv.CreateRequest == nil {
Expand Down Expand Up @@ -255,9 +256,10 @@ func (sws *serverWatchStream) recvLoop() error {

select {
case sws.ctrlStream <- wr:
break requestHandler
case <-sws.closec:
return nil
}
return nil
}

filters := FiltersFromRequest(creq)
Expand Down

0 comments on commit 3fde9e7

Please sign in to comment.