Skip to content
This repository has been archived by the owner on Oct 31, 2020. It is now read-only.

Epoll event engine is missing EPOLLRDHUP #4

Open
michaeltalyansky opened this issue Oct 14, 2015 · 0 comments
Open

Epoll event engine is missing EPOLLRDHUP #4

michaeltalyansky opened this issue Oct 14, 2015 · 0 comments

Comments

@michaeltalyansky
Copy link

This causes CLOSE_WAIT-state sockets to linger. This fix cures it:

@@ -142,7 +142,7 @@ static __thread struct _st_epolldata {
#define _ST_EPOLL_EXCEP_CNT(fd) (_st_epoll_data->fd_data[fd].ex_ref_cnt)
#define _ST_EPOLL_REVENTS(fd) (_st_epoll_data->fd_data[fd].revents)

-#define _ST_EPOLL_READ_BIT(fd) (_ST_EPOLL_READ_CNT(fd) ? EPOLLIN : 0)
+#define _ST_EPOLL_READ_BIT(fd) (_ST_EPOLL_READ_CNT(fd) ? (EPOLLIN|EPOLLRDHUP) : 0)
#define _ST_EPOLL_WRITE_BIT(fd) (_ST_EPOLL_WRITE_CNT(fd) ? EPOLLOUT : 0)
#define _ST_EPOLL_EXCEP_BIT(fd) (_ST_EPOLL_EXCEP_CNT(fd) ? EPOLLPRI : 0)
#define _ST_EPOLL_EVENTS(fd) \

commit accd04f in my fork.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant