Skip to content

Commit 2fe823b

Browse files
author
caiweidong
committed
fix: use locked func to replace the raw one to avoid concurrent read
1 parent e6390ce commit 2fe823b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubelet/util/pluginwatcher/plugin_watcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func (w *Watcher) handlePluginRegistration(socketPath string) error {
275275
return fmt.Errorf("failed to get plugin info using RPC GetInfo at socket %s, err: %v", socketPath, err)
276276
}
277277

278-
handler, ok := w.handlers[infoResp.Type]
278+
handler, ok := w.getHandler(infoResp.Type)
279279
if !ok {
280280
return w.notifyPlugin(client, false, fmt.Sprintf("no handler registered for plugin type: %s at socket %s", infoResp.Type, socketPath))
281281
}

0 commit comments

Comments
 (0)