Skip to content

Commit

Permalink
Also fix on kqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Sep 9, 2024
1 parent 62aa683 commit dfd865d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/kqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class KQueue : public MasterEventEngine, public CascadingEventEngine, public Res
return 0;
short ev = (interests == EVENT_READ) ? EVFILT_READ : EVFILT_WRITE;
enqueue(fd, ev, EV_ADD | EV_ONESHOT, 0, CURRENT);
int ret = thread_usleep(timeout);
int ret = thread_usleep(timeout.timeout() ? timeout : Timeout(10));
ERRNO err;
if (ret == -1 && err.no == EOK) {
return 0; // event arrived
Expand Down

0 comments on commit dfd865d

Please sign in to comment.