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