mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
fix: use locked func to replace the raw one to avoid concurrent read
This commit is contained in:
parent
e6390ce3ff
commit
2fe823ba46
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user