Fix a data race in registrytest

Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
Ziheng Liu 2019-10-28 19:22:06 -04:00
parent b6c8f4916d
commit 8a6fdfd648

View File

@ -114,5 +114,7 @@ func (r *NodeRegistry) DeleteNode(ctx context.Context, nodeID string) error {
}
func (r *NodeRegistry) WatchNodes(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {
r.Lock()
defer r.Unlock()
return nil, r.Err
}