web UI added and refactoring done

This commit is contained in:
Ayzen
2026-06-06 00:06:30 +03:00
parent 3c30a12d4a
commit af6005d68f
65 changed files with 3630 additions and 4720 deletions
@@ -511,8 +511,16 @@ void TcpServer::acceptor_loop() {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
// Listening socket closed during shutdown produces EBADF/EINVAL; bail.
break;
// Shutdown closes the listening socket (EBADF/EINVAL) -> bail. But an
// unexpected errno on a still-running server (e.g. EPERM from a firewall
// rule) must NOT kill the acceptor and silently stop serving new clients:
// log, back off, and keep accepting.
if (!running_.load(std::memory_order_acquire)) {
break;
}
std::cerr << "locator: accept() failed (errno=" << errno << "); retrying\n";
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
reap_finished_clients();