fix: pluginMap uses sync.Map to avoid data race

This commit is contained in:
徐聪
2022-08-01 17:04:39 +08:00
parent 44e844829d
commit c5a0a0fc27
4 changed files with 19 additions and 14 deletions

View File

@@ -24,7 +24,7 @@ func removeHashicorpGoPlugin() {
log.Info().Msg("[teardown] remove hashicorp go plugin")
os.Remove(tmpl("debugtalk.bin"))
pluginPath, _ := filepath.Abs(tmpl("debugtalk.bin"))
delete(pluginMap, pluginPath)
pluginMap.Delete(pluginPath)
}
func buildHashicorpPyPlugin() {