From 3c7b40063dbba777d27efd2fa4c7093d5507dca6 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 5 Dec 2017 08:19:32 -0600 Subject: call OnActivate after plugin crash, update example (#7940) --- plugin/pluginenv/environment.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plugin/pluginenv/environment.go') diff --git a/plugin/pluginenv/environment.go b/plugin/pluginenv/environment.go index 62eb20e9d..26511c651 100644 --- a/plugin/pluginenv/environment.go +++ b/plugin/pluginenv/environment.go @@ -148,13 +148,9 @@ func (env *Environment) ActivatePlugin(id string) error { if err != nil { return errors.Wrapf(err, "unable to get api for plugin: %v", id) } - if err := supervisor.Start(); err != nil { + if err := supervisor.Start(api); err != nil { return errors.Wrapf(err, "unable to start plugin: %v", id) } - if err := supervisor.Hooks().OnActivate(api); err != nil { - supervisor.Stop() - return errors.Wrapf(err, "unable to activate plugin: %v", id) - } activePlugin.Supervisor = supervisor } -- cgit v1.2.3-1-g7c22