mirror of
https://github.com/edubart/otclient.git
synced 2025-04-29 17:19:20 +02:00
Fix process hang on fatal errors (#1163)
This commit is contained in:
parent
9eb13494f9
commit
e73f6df221
@ -25,6 +25,7 @@
|
||||
|
||||
//#include <boost/regex.hpp>
|
||||
#include <framework/core/resourcemanager.h>
|
||||
#include <framework/core/asyncdispatcher.h>
|
||||
|
||||
#ifdef FW_GRAPHICS
|
||||
#include <framework/platform/platformwindow.h>
|
||||
@ -95,6 +96,10 @@ void Logger::log(Fw::LogLevel level, const std::string& message)
|
||||
g_window.displayFatalError(message);
|
||||
#endif
|
||||
s_ignoreLogs = true;
|
||||
|
||||
// NOTE: Threads must finish before the process can exit.
|
||||
g_asyncDispatcher.terminate();
|
||||
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user