From 618314985d6a632ccfd2001d969d32a5ee6e4ca1 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 11 Mar 2012 20:45:43 +0200 Subject: Proper handling of failing to bind server socket --- src/server.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h index 4948b8ba1..0b4c67deb 100644 --- a/src/server.h +++ b/src/server.h @@ -545,6 +545,11 @@ public: std::string getWorldPath(){ return m_path_world; } + void setAsyncFatalError(const std::string &error) + { + m_async_fatal_error.set(error); + } + private: // con::PeerHandler implementation. @@ -658,6 +663,9 @@ private: // Equivalent of /usr/share/minetest/server std::string m_path_share; + // Thread can set; step() will throw as ServerError + MutexedVariable m_async_fatal_error; + // Some timers float m_liquid_transform_timer; float m_print_info_timer; -- cgit v1.2.3