mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-12 17:54:04 +00:00
fix holding lock during sleep
oops
This commit is contained in:
+7
-2
@@ -135,8 +135,13 @@ void TLuaEngine::operator()() {
|
||||
}
|
||||
}
|
||||
}
|
||||
std::unique_lock Lock(mLuaStatesMutex);
|
||||
if (mLuaStates.empty()) {
|
||||
bool StatesEmpty = false;
|
||||
{
|
||||
std::unique_lock Lock(mLuaStatesMutex);
|
||||
StatesEmpty = mLuaStates.empty();
|
||||
}
|
||||
|
||||
if (StatesEmpty) {
|
||||
beammp_trace("No Lua states, event loop running extremely sparsely");
|
||||
Application::SleepSafeSeconds(10);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user