TLuaEngine: improve result queue handling

This commit is contained in:
Lion Kortlepel
2022-03-31 15:59:31 +02:00
parent de82caef33
commit b97397132d
3 changed files with 27 additions and 23 deletions

View File

@@ -133,7 +133,7 @@ int BeamMPServerMain(MainArguments Arguments) {
});
Application::RegisterShutdownHandler([] {
auto Futures = LuaAPI::MP::Engine->TriggerEvent("onShutdown", "");
TLuaEngine::WaitForAll(Futures);
TLuaEngine::WaitForAll(Futures, std::chrono::seconds(5));
});
TServer Server(Arguments.List);