Update plugin manager to remove plugin from map if startup fails. Prevents timeout when retrying to start a failed plugin. Closes #1631

This commit is contained in:
kai
2022-03-10 16:05:00 +00:00
parent 7063641b1b
commit f85c76b139

View File

@@ -164,6 +164,10 @@ func (m *PluginManager) getPlugin(connection string) (_ *pb.ReattachConfig, err
// so we need to start the plugin
client, err := m.startPlugin(connection)
if err != nil {
m.mut.Lock()
delete(m.Plugins, connection)
m.mut.Unlock()
log.Println("[TRACE] startPlugin failed with", err)
return nil, err
}