Merge pull request #6438 from fd/fix/dameon/close-started-plugins

Close started plugins when one of them fails to start.
This commit is contained in:
Steven Allen 2019-06-12 09:39:05 -07:00 committed by GitHub
commit 2a22eb6b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ func (loader *PluginLoader) Start(iface coreiface.CoreAPI) error {
if pl, ok := pl.(plugin.PluginDaemon); ok {
err := pl.Start(iface)
if err != nil {
_ = closePlugins(loader.plugins[i:])
_ = closePlugins(loader.plugins[:i])
return err
}
}