Added new shutdown phase 'UnloadPlugins' to fix GloWebInterface deinitialization

- Added new function 'UnloadPlugins' to unload plugins that
  require de-initialization.
- 'GloWebInterface' plugin is now stopped during this phase.
pull/3105/head
Javier Jaramago Fernández 6 years ago
parent 2d98ee0872
commit 7f8875c026

@ -1296,7 +1296,15 @@ static void LoadPlugins() {
}
}
/**
* @brief Unloads all the plugins that hold some resources that
* need to be deallocated.
*/
void UnloadPlugins() {
if (GloWebInterface) {
GloWebInterface->stop();
}
}
void ProxySQL_Main_init_phase2___not_started() {
LoadPlugins();
@ -1893,6 +1901,9 @@ __shutdown:
proxy_info("Starting shutdown...\n");
// First shutdown step is to unload plugins
UnloadPlugins();
ProxySQL_Main_init_phase4___shutdown();
proxy_info("Shutdown completed!\n");

Loading…
Cancel
Save