Merge pull request #7504 from heyitsanthony/fix-watch-wait
clientv3: close open watch channel if substream is closing on reconnectrelease-3.2
commit
7a6b61cd6f
|
@ -694,6 +694,10 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str
|
||||||
go func(ws *watcherStream) {
|
go func(ws *watcherStream) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if ws.closing {
|
if ws.closing {
|
||||||
|
if ws.initReq.ctx.Err() != nil && ws.outc != nil {
|
||||||
|
close(ws.outc)
|
||||||
|
ws.outc = nil
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in New Issue