mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: only return closing error to watcher if context is not canceled
Fixes #6503
This commit is contained in:
committed by
Gyu-Ho Lee
parent
1becf9d2f5
commit
e853451cd2
@@ -342,7 +342,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)
|
||||
|
||||
Reference in New Issue
Block a user