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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user