| 43 | } |
| 44 | |
| 45 | void ServerRconThread::run() { |
| 46 | try { |
| 47 | auto timeout = Root::singleton().configuration()->get("rconServerTimeout").toInt(); |
| 48 | while (!m_stop) { |
| 49 | if (auto client = m_rconServer.accept(100)) { |
| 50 | client->setTimeout(timeout); |
| 51 | auto rconClient = make_shared<ServerRconClient>(m_universe, client); |
| 52 | rconClient->start(); |
| 53 | m_clients[client->remoteAddress().address()] = rconClient; |
| 54 | clearClients(); |
| 55 | } |
| 56 | } |
| 57 | } catch (std::exception const& e) { |
| 58 | Logger::error("ServerRconThread exception caught: {}", e.what()); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | } |
nothing calls this directly
no test coverage detected