| 391 | } |
| 392 | |
| 393 | void WaitForRequests() { |
| 394 | Reactor.enable_async_stop(); |
| 395 | |
| 396 | while (true) { |
| 397 | std::optional Timeout = std::chrono::seconds {RequestTimeout}; |
| 398 | if (Foreground || NumClients > 0) { |
| 399 | Timeout.reset(); |
| 400 | } |
| 401 | auto Result = Reactor.run_one(Timeout); |
| 402 | if (Result != fasio::error::success || Reactor.stopped()) { |
| 403 | Reactor.cleanup(); |
| 404 | break; |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | LogMan::Msg::DFmt("[FEXServer] Shutting Down"); |
| 409 | |
| 410 | CloseConnections(); |
| 411 | } |
| 412 | |
| 413 | void SetConfiguration(bool Foreground, uint32_t PersistentTimeout) { |
| 414 | ProcessPipe::Foreground = Foreground; |
no test coverage detected