From c444b1b94545888361998e39277d49228ce0c55d Mon Sep 17 00:00:00 2001 From: Simon Menke Date: Wed, 12 Jun 2019 11:55:03 +0200 Subject: [PATCH] Close started plugins when one of them fails to start. --- plugin/loader/loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/loader/loader.go b/plugin/loader/loader.go index b5a2d08edf9..f2a9ab60c4e 100644 --- a/plugin/loader/loader.go +++ b/plugin/loader/loader.go @@ -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 } }