Skip to content

Commit 4b9c60c

Browse files
committed
Add EV_EOF to kqueue modes
1 parent ad0ce71 commit 4b9c60c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/detail/io_notifier_kqueue.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ auto io_notifier_kqueue::watch_timer(const detail::timer_handle& timer, std::chr
5151
auto io_notifier_kqueue::watch(fd_t fd, coro::poll_op op, void* data, bool keep) -> bool
5252
{
5353
auto event_data = event_t{};
54-
auto mode = EV_ADD | EV_ENABLE;
54+
auto mode = EV_ADD | EV_ENABLE | EV_EOF;
5555
if (!keep)
5656
{
5757
mode |= EV_ONESHOT;
@@ -71,7 +71,7 @@ auto io_notifier_kqueue::watch(detail::poll_info& pi) -> bool
7171
&event_data,
7272
pi.m_fd,
7373
static_cast<int16_t>(coro::poll_op::read),
74-
EV_ADD | EV_ONESHOT | EV_ENABLE,
74+
EV_ADD | EV_ONESHOT | EV_ENABLE | EV_EOF,
7575
0,
7676
0,
7777
static_cast<void*>(&pi));
@@ -81,7 +81,7 @@ auto io_notifier_kqueue::watch(detail::poll_info& pi) -> bool
8181
&event_data,
8282
pi.m_fd,
8383
static_cast<int16_t>(coro::poll_op::write),
84-
EV_ADD | EV_ONESHOT | EV_ENABLE,
84+
EV_ADD | EV_ONESHOT | EV_ENABLE | EV_EOF,
8585
0,
8686
0,
8787
static_cast<void*>(&pi));
@@ -96,7 +96,7 @@ auto io_notifier_kqueue::watch(detail::poll_info& pi) -> bool
9696
&event_data,
9797
pi.m_fd,
9898
static_cast<int16_t>(pi.m_op),
99-
EV_ADD | EV_ONESHOT | EV_ENABLE,
99+
EV_ADD | EV_ONESHOT | EV_ENABLE | EV_EOF,
100100
0,
101101
0,
102102
static_cast<void*>(&pi));

0 commit comments

Comments
 (0)