1
0

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:
madmaxoft@gmail.com
2012-07-15 20:07:38 +00:00
parent e65d28484d
commit 2c490d4229
4 changed files with 32 additions and 4 deletions

View File

@@ -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 )