diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2012-03-28 12:50:02 +0200 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2012-03-28 12:50:02 +0200 |
commit | e95d614f5240a01c38cbd3cff390c654cec56a97 (patch) | |
tree | 42e2e3aed2d3d703e3bb13915bfb61a130212ce6 | |
parent | cc0448a017a418446c4c28cdcc2d64940c7e9ecf (diff) |
Core/Misc: Prevent calling ACE_Task_Base::wait() on an invalid handle. WorldSocketMgr::Wait is already called in WorldRunnable post-service hook
-rwxr-xr-x | src/server/worldserver/Master.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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(); |