Skip to content

Commit

Permalink
clientv3: only return closing error to watcher if context is not canc…
Browse files Browse the repository at this point in the history
…eled

Fixes etcd-io#6503
  • Loading branch information
Anthony Romano committed Oct 4, 2016
1 parent 8e1c989 commit e285f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clientv3/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (w *watchGrpcStream) closeSubstream(ws *watcherStream) {
default:
}
// close subscriber's channel
if closeErr := w.closeErr; closeErr != nil {
if closeErr := w.closeErr; closeErr != nil && ws.initReq.ctx.Err() == nil {
go w.sendCloseSubstream(ws, &WatchResponse{closeErr: w.closeErr})
} else {
close(ws.outc)
Expand Down

0 comments on commit e285f59

Please sign in to comment.