clientv3: register waitCancelSubstreams closingc goroutine with waitgroup
Fixes #7598
This commit is contained in:
@ -711,7 +711,11 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str
|
|||||||
ws.closing = true
|
ws.closing = true
|
||||||
close(ws.outc)
|
close(ws.outc)
|
||||||
ws.outc = nil
|
ws.outc = nil
|
||||||
go func() { w.closingc <- ws }()
|
w.wg.Add(1)
|
||||||
|
go func() {
|
||||||
|
defer w.wg.Done()
|
||||||
|
w.closingc <- ws
|
||||||
|
}()
|
||||||
case <-stopc:
|
case <-stopc:
|
||||||
}
|
}
|
||||||
}(w.resuming[i])
|
}(w.resuming[i])
|
||||||
|
Reference in New Issue
Block a user