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