Fix epoll dispatch dropping INotify events, ConsoleServer self-deadlock, and add TLS SNI support

- INotify/Thread epoll dispatch was silently dropping every live
  core::INotify event (an isKnownINotify registry fixes it) - this had
  broken mail delivery for over a week, masked by routine restarts.
- TCPServer::lock self-deadlocked every admin-console connection via a
  plain std::mutex being re-entered; switched to recursive_mutex.
- TLS.cpp/h: SNI-based certificate selection (addSNIContext), the
  groundwork for multi-tenant TLS (qualityiron.vegas alongside
  barant.com on one APIServer process).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Brad ArantandClaude Sonnet 5 committed 2026-10-06 17:38:37 +00:00
1 parent d058322cc6
commit 1d3d30cd05
8 files changed
+222 -55

No files matched your search

+5 -5
View File
@@ -174,7 +174,7 @@ namespace core {
// (combat, position, chat) go through, so this is very likely the
// actual dominant cause of that crash, not just the ItemDataBase
// subscriber list this session's earlier fix addressed.
std::lock_guard<std::mutex> guard(lock);
std::lock_guard guard(lock);
int sequence = 0;
for (auto &sessionx : sessions)
{
@@ -186,14 +186,14 @@ namespace core {
}
void TCPServer::sendToAll(std::stringstream &data) {
std::lock_guard<std::mutex> guard(lock);
std::lock_guard guard(lock);
for (auto &session : sessions)
session->write(data.str());
data.str("");
}
void TCPServer::sendToAll(std::stringstream &data, TCPSession &sender) {
std::lock_guard<std::mutex> guard(lock);
std::lock_guard guard(lock);
for (auto &session : sessions)
if (session.get() != &sender)
session->write(data.str());
@@ -201,7 +201,7 @@ namespace core {
}
void TCPServer::sendToAll(std::stringstream &data, TCPSession &sender, SessionFilter filter) {
std::lock_guard<std::mutex> guard(lock);
std::lock_guard guard(lock);
for (auto &session : sessions)
if (filter.test(*session))
if (session.get() != &sender)
@@ -211,7 +211,7 @@ namespace core {
std::shared_ptr<TCPSession> TCPServer::getSessionByAlias(void *alias) {
coreutils::Log(coreutils::LOG_DEBUG_1) << alias;
std::lock_guard<std::mutex> guard(lock);
std::lock_guard guard(lock);
for (auto &session : sessions)
if (session->alias == alias)
return session;