From e95d614f5240a01c38cbd3cff390c654cec56a97 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 28 Mar 2012 12:50:02 +0200 Subject: Core/Misc: Prevent calling ACE_Task_Base::wait() on an invalid handle. WorldSocketMgr::Wait is already called in WorldRunnable post-service hook --- src/server/worldserver/Master.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index f4945e025b0..03b2859c514 100755 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -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(); -- cgit v1.2.3