World threads are stopped before the plugin mgr for clean exit (FS #228)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@669 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -162,6 +162,8 @@ void cRoot::Start()
|
||||
// Deallocate stuffs
|
||||
LOG("Shutting down server...");
|
||||
m_Server->Shutdown(); // This waits for threads to stop and d/c clients
|
||||
LOG("Stopping world threads...");
|
||||
StopWorlds();
|
||||
LOG("Stopping authenticator...");
|
||||
m_Authenticator.Stop();
|
||||
LOG("Stopping plugin manager...");
|
||||
@@ -253,6 +255,18 @@ void cRoot::StartWorlds(void)
|
||||
|
||||
|
||||
|
||||
void cRoot::StopWorlds(void)
|
||||
{
|
||||
for( WorldMap::iterator itr = m_pState->WorldsByName.begin(); itr != m_pState->WorldsByName.end(); ++itr )
|
||||
{
|
||||
itr->second->StopThreads();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cRoot::UnloadWorlds(void)
|
||||
{
|
||||
for( WorldMap::iterator itr = m_pState->WorldsByName.begin(); itr != m_pState->WorldsByName.end(); ++itr )
|
||||
|
||||
Reference in New Issue
Block a user