Merge pull request #76940 from cwdsuzhou/use_locked_func

fix: use locked func to replace the raw one to avoid concurrent read
k3s-v1.15.3
Kubernetes Prow Robot 2019-04-25 12:04:08 -07:00 committed by GitHub
commit 40a7a2370b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ func (w *Watcher) handlePluginRegistration(socketPath string) error {
return fmt.Errorf("failed to get plugin info using RPC GetInfo at socket %s, err: %v", socketPath, err)
}
handler, ok := w.handlers[infoResp.Type]
handler, ok := w.getHandler(infoResp.Type)
if !ok {
return w.notifyPlugin(client, false, fmt.Sprintf("no handler registered for plugin type: %s at socket %s", infoResp.Type, socketPath))
}