Report errors on WaitForAll

This commit is contained in:
Lion Kortlepel
2021-10-01 03:56:18 +02:00
parent 9eabd19e17
commit d1f890752a
2 changed files with 4 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ void TLuaEngine::operator()() {
}
}
if (Res->Error) {
beammp_lua_error(Res->ErrorMessage);
beammp_lua_error(Res->Function + ": " + Res->ErrorMessage);
}
}
}
@@ -139,6 +139,9 @@ void TLuaEngine::WaitForAll(std::vector<std::shared_ptr<TLuaResult>>& Results) {
while (!Result->Ready) {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
if (Result->Error) {
beammp_lua_error(Result->Function + ": " + Result->ErrorMessage);
}
}
}

View File

@@ -331,8 +331,6 @@ void TNetwork::Authentication(const TConnection& ClientConnection) {
return;
}
LuaAPI::MP::Engine->ReportErrors(Futures);
if (mServer.ClientCount() < size_t(Application::Settings.MaxPlayers)) {
beammp_info("Identification success");
mServer.InsertClient(Client);