mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Fixed worldserver shutdown with --update-databases-only
This commit is contained in:
@@ -257,6 +257,8 @@ extern int main(int argc, char** argv)
|
||||
for (int i = 0; i < numThreads; ++i)
|
||||
threadPool->PostWork([ioContext]() { ioContext->run(); });
|
||||
|
||||
std::shared_ptr<void> ioContextStopHandle(nullptr, [ioContext](void*) { ioContext->stop(); });
|
||||
|
||||
// Set process priority according to configuration settings
|
||||
SetProcessPriority("server.worldserver", sConfigMgr->GetIntDefault(CONFIG_PROCESSOR_AFFINITY, 0), sConfigMgr->GetBoolDefault(CONFIG_HIGH_PRIORITY, false));
|
||||
|
||||
@@ -400,7 +402,7 @@ extern int main(int argc, char** argv)
|
||||
WorldPackets::Auth::ConnectTo::ShutdownEncryption();
|
||||
WorldPackets::Auth::EnterEncryptedMode::ShutdownEncryption();
|
||||
|
||||
ioContext->stop();
|
||||
ioContextStopHandle.reset();
|
||||
|
||||
threadPool.reset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user