mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: change watchGrpcStream Close() to close()
private struct shouldn't have public method.
This commit is contained in:
parent
4dff7aaa2a
commit
762b2c625c
@ -317,14 +317,14 @@ func (w *watcher) Close() (err error) {
|
|||||||
w.streams = nil
|
w.streams = nil
|
||||||
w.mu.Unlock()
|
w.mu.Unlock()
|
||||||
for _, wgs := range streams {
|
for _, wgs := range streams {
|
||||||
if werr := wgs.Close(); werr != nil {
|
if werr := wgs.close(); werr != nil {
|
||||||
err = werr
|
err = werr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *watchGrpcStream) Close() (err error) {
|
func (w *watchGrpcStream) close() (err error) {
|
||||||
w.cancel()
|
w.cancel()
|
||||||
<-w.donec
|
<-w.donec
|
||||||
select {
|
select {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user