clientv3: use Mutex for watcher lock

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
This commit is contained in:
Ted Yu 2020-05-19 19:20:44 -07:00
parent 732df43cf8
commit 35d026246c

View File

@ -139,7 +139,7 @@ type watcher struct {
callOpts []grpc.CallOption
// mu protects the grpc streams map
mu sync.RWMutex
mu sync.Mutex
// streams holds all the active grpc streams keyed by ctx value.
streams map[string]*watchGrpcStream