Skip to content

Commit

Permalink
Run server on main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
SimulPiscator committed Jan 31, 2023
1 parent 9797f3f commit c15d173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit c15d173

Please sign in to comment.