1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 15:43:13 +02:00

Always unload socketengines/database/protocl etc modules last, and fixed a potential crash in m_mysql when unloading when not in GDB

This commit is contained in:
Adam
2010-08-17 22:19:36 -04:00
parent fa7684b3a3
commit b180d5f975
6 changed files with 22 additions and 18 deletions
+2 -6
View File
@@ -189,9 +189,7 @@ void do_restart_services()
SocketEngine->Process();
delete UplinkSock;
close_log();
/* First don't unload protocol module, then do so */
ModuleManager::UnloadAll(false);
ModuleManager::UnloadAll(true);
ModuleManager::UnloadAll();
chdir(binary_dir.c_str());
execve(services_bin.c_str(), my_av, my_envp);
if (!readonly)
@@ -238,9 +236,7 @@ static void services_shutdown()
SocketEngine->Process();
delete UplinkSock;
FOREACH_MOD(I_OnShutdown, OnShutdown());
/* First don't unload protocol module, then do so */
ModuleManager::UnloadAll(false);
ModuleManager::UnloadAll(true);
ModuleManager::UnloadAll();
/* just in case they weren't all removed at least run once */
ModuleRunTimeDirCleanUp();
}