Merge pull request #7677 from heyitsanthony/fix-waitsubstream

clientv3: register waitCancelSubstreams closingc goroutine with waitgroup
This commit is contained in:
Anthony Romano
2017-04-06 11:10:06 -07:00
committed by GitHub

View File

@@ -711,7 +711,11 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str
ws.closing = true
close(ws.outc)
ws.outc = nil
go func() { w.closingc <- ws }()
w.wg.Add(1)
go func() {
defer w.wg.Done()
w.closingc <- ws
}()
case <-stopc:
}
}(w.resuming[i])