Skip to content

Commit

Permalink
Fix hang on shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed Sep 28, 2024
1 parent 18f91ae commit 93bb983
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/game/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1941,11 +1941,15 @@ void World::DetectDBCLang()
// Only processes packets while session update, the messager, and cli commands processing are NOT running
void World::ProcessAsyncPackets()
{
while (!sWorld.IsStopped())
while (!IsStopped())
{
do
{
std::this_thread::sleep_for(std::chrono::milliseconds(20));

if (IsStopped())
return;

} while (!m_canProcessAsyncPackets);

for (auto const& itr : m_sessions)
Expand Down

0 comments on commit 93bb983

Please sign in to comment.