Skip to content

Commit 3908a5e

Browse files
committed
Do not offer EV_FEATURE_EARLY_CLOSE if we have no EPOLLRDHUP
1 parent f24cba3 commit 3908a5e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

epoll.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
*/
6666
#if !defined(EPOLLRDHUP)
6767
#define EPOLLRDHUP 0
68+
#define EARLY_CLOSE_IF_HAVE_RDHUP 0
69+
#else
70+
#define EARLY_CLOSE_IF_HAVE_RDHUP EV_FEATURE_EARLY_CLOSE
6871
#endif
6972

7073
#include "epolltable-internal.h"
@@ -101,7 +104,7 @@ static const struct eventop epollops_changelist = {
101104
epoll_dispatch,
102105
epoll_dealloc,
103106
1, /* need reinit */
104-
EV_FEATURE_ET|EV_FEATURE_O1|EV_FEATURE_EARLY_CLOSE,
107+
EV_FEATURE_ET|EV_FEATURE_O1| EARLY_CLOSE_IF_HAVE_RDHUP,
105108
EVENT_CHANGELIST_FDINFO_SIZE
106109
};
107110

0 commit comments

Comments
 (0)