Fix possible panic on server shutdown (#15140)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
38307c0b73
Коммит
4baf255dc2
@@ -184,6 +184,10 @@ func (a *App) InitPlugins(pluginDir, webappPluginDir string) {
|
|||||||
|
|
||||||
plugins := a.processPrepackagedPlugins(prepackagedPluginsDir)
|
plugins := a.processPrepackagedPlugins(prepackagedPluginsDir)
|
||||||
pluginsEnvironment = a.GetPluginsEnvironment()
|
pluginsEnvironment = a.GetPluginsEnvironment()
|
||||||
|
if pluginsEnvironment == nil {
|
||||||
|
mlog.Info("Plugins environment not found, server is likely shutting down")
|
||||||
|
return
|
||||||
|
}
|
||||||
pluginsEnvironment.SetPrepackagedPlugins(plugins)
|
pluginsEnvironment.SetPrepackagedPlugins(plugins)
|
||||||
|
|
||||||
// Sync plugin active state when config changes. Also notify plugins.
|
// Sync plugin active state when config changes. Also notify plugins.
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user