Stop ServerThread immediately on errors

This commit is contained in:
sfan5
2025-01-08 19:31:23 +01:00
parent 9dd09d1056
commit d0d7c11fe1
2 changed files with 14 additions and 2 deletions

View File

@@ -344,8 +344,7 @@ class Server : public con::PeerHandler, public MapEventReceiver,
void setStepSettings(StepSettings spdata) { m_step_settings.store(spdata); }
StepSettings getStepSettings() { return m_step_settings.load(); }
inline void setAsyncFatalError(const std::string &error)
{ m_async_fatal_error.set(error); }
void setAsyncFatalError(const std::string &error);
inline void setAsyncFatalError(const LuaError &e)
{
setAsyncFatalError(std::string("Lua: ") + e.what());