I'm not interested in EPOLLRDHUP
This commit is contained in:
@@ -102,9 +102,9 @@ void Server::receiveConnectionBack(Connection *connection) {
|
||||
struct epoll_event event{};
|
||||
|
||||
if (!connection->hasMessages()) {
|
||||
event.events = EPOLLIN | EPOLLONESHOT | EPOLLRDHUP;
|
||||
event.events = EPOLLIN | EPOLLONESHOT;
|
||||
} else {
|
||||
event.events = EPOLLOUT | EPOLLONESHOT | EPOLLRDHUP;
|
||||
event.events = EPOLLOUT | EPOLLONESHOT;
|
||||
}
|
||||
|
||||
connection->tsan_release();
|
||||
@@ -456,9 +456,9 @@ void Server::process_connection_batch(
|
||||
if (conn) {
|
||||
struct epoll_event event{};
|
||||
if (!conn->hasMessages()) {
|
||||
event.events = EPOLLIN | EPOLLONESHOT | EPOLLRDHUP;
|
||||
event.events = EPOLLIN | EPOLLONESHOT;
|
||||
} else {
|
||||
event.events = EPOLLOUT | EPOLLONESHOT | EPOLLRDHUP;
|
||||
event.events = EPOLLOUT | EPOLLONESHOT;
|
||||
}
|
||||
|
||||
int fd = conn->getFd();
|
||||
|
||||
@@ -670,9 +670,9 @@ int main(int argc, char *argv[]) {
|
||||
// Transfer back to epoll instance. This thread or another thread
|
||||
// will wake when fd is ready
|
||||
if (conn->hasMessages()) {
|
||||
events[i].events = EPOLLOUT | EPOLLONESHOT | EPOLLRDHUP;
|
||||
events[i].events = EPOLLOUT | EPOLLONESHOT;
|
||||
} else {
|
||||
events[i].events = EPOLLIN | EPOLLONESHOT | EPOLLRDHUP;
|
||||
events[i].events = EPOLLIN | EPOLLONESHOT;
|
||||
}
|
||||
conn->tsan_release();
|
||||
Connection *raw_conn = conn.release();
|
||||
|
||||
Reference in New Issue
Block a user