We don't want to close the connection on EPOLLRDHUP

We'll rely on the errors from reads and writes to close the connections
This commit is contained in:
2025-08-20 14:09:39 -04:00
parent cf692e71ef
commit 8ccb02f450
2 changed files with 2 additions and 3 deletions

View File

@@ -313,7 +313,7 @@ void Server::start_network_threads() {
conn->tsan_acquire(); conn->tsan_acquire();
events[i].data.ptr = nullptr; events[i].data.ptr = nullptr;
if (events[i].events & (EPOLLERR | EPOLLHUP | EPOLLRDHUP)) { if (events[i].events & EPOLLERR) {
continue; // Connection closed - unique_ptr destructor cleans up continue; // Connection closed - unique_ptr destructor cleans up
} }

View File

@@ -547,8 +547,7 @@ int main(int argc, char *argv[]) {
events[i].data.ptr = nullptr; events[i].data.ptr = nullptr;
const int fd = conn->fd; const int fd = conn->fd;
// Handle connection errors like server if (events[i].events & EPOLLERR) {
if (events[i].events & (EPOLLERR | EPOLLHUP | EPOLLRDHUP)) {
continue; // Let unique_ptr destructor clean up continue; // Let unique_ptr destructor clean up
} }
if (events[i].events & EPOLLOUT) { if (events[i].events & EPOLLOUT) {