From f7cda71bbdff8ce64e968f683f9b0e313cb087ad Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 28 May 2019 10:01:02 -0700 Subject: [PATCH] Preventing failed plugins webapp components from being served. (#10953) --- plugin/environment.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/environment.go b/plugin/environment.go index 0e8e6f1397..faf5fa05eb 100644 --- a/plugin/environment.go +++ b/plugin/environment.go @@ -82,7 +82,10 @@ func (env *Environment) Available() ([]*model.BundleInfo, error) { func (env *Environment) Active() []*model.BundleInfo { activePlugins := []*model.BundleInfo{} env.activePlugins.Range(func(key, value interface{}) bool { - activePlugins = append(activePlugins, value.(activePlugin).BundleInfo) + plugin := value.(activePlugin) + if plugin.State == model.PluginStateRunning { + activePlugins = append(activePlugins, plugin.BundleInfo) + } return true })