From c15d1731c3683767d14e648b3a733a11553b064c Mon Sep 17 00:00:00 2001 From: SimulPiscator Date: Tue, 31 Jan 2023 22:27:25 +0100 Subject: [PATCH] Run server on main thread --- server/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/main.cpp b/server/main.cpp index 39b4568..de22c0f 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -47,8 +47,12 @@ main(int argc, char** argv) ::sigaction(SIGHUP, &action, nullptr); action.sa_handler = SIG_IGN; ::sigaction(SIGPIPE, &action, nullptr); +#if 0 auto serverThread = std::thread([&ok]() { ok = pServer->run(); }); serverThread.join(); +#else + ok = pServer->run(); +#endif pServer = nullptr; return ok ? 0 : -1; }