Minor tidying and cleanup

This commit is contained in:
2025-08-22 13:36:17 -04:00
parent 45bf6b6455
commit 815e6c065a
5 changed files with 11 additions and 48 deletions

View File

@@ -196,7 +196,7 @@ int Server::createLocalConnection() {
// Create Connection object
auto connection = std::unique_ptr<Connection>(new Connection(
addr, server_fd, connection_id_.fetch_add(1, std::memory_order_relaxed),
epoll_index, &handler_, weak_from_this()));
epoll_index, &handler_, *this));
// Store in registry
connection_registry_.store(server_fd, std::move(connection));
@@ -377,7 +377,7 @@ void Server::start_io_threads(std::vector<std::thread> &threads) {
batch[batch_count] = std::unique_ptr<Connection>(new Connection(
addr, fd,
connection_id_.fetch_add(1, std::memory_order_relaxed),
epoll_index, &handler_, weak_from_this()));
epoll_index, &handler_, *this));
batch_events[batch_count] =
EPOLLIN; // New connections always start with read
batch_count++;