Skip to content

Commit fb4327e

Browse files
committed
Add 'EV_ONESHOT' for kqueue timer.
1 parent 0dacf70 commit fb4327e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/kernel/poller.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static int __poller_set_timerfd(int fd, const struct timespec *abstime,
231231

232232
if (abstime->tv_sec || abstime->tv_nsec)
233233
{
234-
flags = EV_ADD;
234+
flags = EV_ADD | EV_ONESHOT;
235235
clock_gettime(CLOCK_MONOTONIC, &curtime);
236236
nseconds = 1000000000LL * (abstime->tv_sec - curtime.tv_sec);
237237
nseconds += abstime->tv_nsec - curtime.tv_nsec;

0 commit comments

Comments
 (0)