Core/Misc: Prevent calling ACE_Task_Base::wait() on an invalid handle. WorldSocketMgr::Wait is already called in WorldRunnable post-service hook

This commit is contained in:
Machiavelli
2012-03-28 12:50:02 +02:00
parent cc0448a017
commit e95d614f52
+5 -6
View File
@@ -270,7 +270,11 @@ int Master::Run()
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
sLog->outString("%s (worldserver-daemon) ready...", _FULLVERSION);
sWorldSocketMgr->Wait();
// when the main thread closes the singletons get unloaded
// since worldrunnable uses them, it will crash if unloaded after master
world_thread.wait();
rar_thread.wait();
if (soap_thread)
{
@@ -282,11 +286,6 @@ int Master::Run()
// set server offline
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realmID);
// when the main thread closes the singletons get unloaded
// since worldrunnable uses them, it will crash if unloaded after master
world_thread.wait();
rar_thread.wait();
///- Clean database before leaving
ClearOnlineAccounts();