1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 14:29:26 +08:00

add: luahook server retry

This commit is contained in:
0O0o0oOoO00
2025-10-04 18:36:57 +08:00
parent 8aa3db1d45
commit 6c41ef6077

View File

@@ -841,7 +841,17 @@ CrackerServer::CrackerServer() {
std::thread([this] {
SPDLOG_INFO("Start server on port 23897");
listen("0.0.0.0", 23897);
while(true) {
try {
listen("0.0.0.0", 23897);
} catch(std::exception& e) {
SPDLOG_ERROR(e.what());
} catch(...) {
SPDLOG_ERROR("Unknown exception");
}
SPDLOG_INFO("Restart server");
}
}).detach();
}