summaryrefslogtreecommitdiffstats
path: root/plugin/pluginenv/environment.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-12-05 08:19:32 -0600
committerJoram Wilander <jwawilander@gmail.com>2017-12-05 09:19:32 -0500
commit3c7b40063dbba777d27efd2fa4c7093d5507dca6 (patch)
tree81b77acde7ae6eb2909e2d99782f51f4989dd5cf /plugin/pluginenv/environment.go
parent7a1f81cd52c4b58a058ae11e361a80ee3b24d141 (diff)
downloadchat-3c7b40063dbba777d27efd2fa4c7093d5507dca6.tar.gz
chat-3c7b40063dbba777d27efd2fa4c7093d5507dca6.tar.bz2
chat-3c7b40063dbba777d27efd2fa4c7093d5507dca6.zip
call OnActivate after plugin crash, update example (#7940)
Diffstat (limited to 'plugin/pluginenv/environment.go')
-rw-r--r--plugin/pluginenv/environment.go6
1 files changed, 1 insertions, 5 deletions
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
}