summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-10-15 17:08:51 -0400
committerChristopher Speller <crspeller@gmail.com>2018-10-15 14:08:51 -0700
commitb843774de841f71e346bcd9e30b86fecddec3318 (patch)
tree06bfa1d9a7993db3dedb6222abbb4551c61196fe
parent6aaa10bddb730926be90180e315e14ba9b8c94e5 (diff)
downloadchat-b843774de841f71e346bcd9e30b86fecddec3318.tar.gz
chat-b843774de841f71e346bcd9e30b86fecddec3318.tar.bz2
chat-b843774de841f71e346bcd9e30b86fecddec3318.zip
MM-11905: deactivate plugins before unregistering (#9666)
Plugins that listen for config changes might incorrectly re-register their commands before being /actually/ deactivated, leaving the new commands alive thereafter.
-rw-r--r--app/plugin_install.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/plugin_install.go b/app/plugin_install.go
index 588f86f08..65e697356 100644
--- a/app/plugin_install.go
+++ b/app/plugin_install.go
@@ -120,9 +120,8 @@ func (a *App) removePlugin(id string) *model.AppError {
a.Publish(message)
}
- a.UnregisterPluginCommands(id)
-
a.Plugins.Deactivate(id)
+ a.UnregisterPluginCommands(id)
err = os.RemoveAll(pluginPath)
if err != nil {