Skip to content

Commit

Permalink
Fix kqueue engine, not compliant with new Nsock API after IOCP integr…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
bonsaiviking committed Aug 25, 2016
1 parent f4c5c83 commit f6db673
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nsock/src/engine_kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ int kqueue_iod_register(struct npool *nsp, struct niod *iod, struct nevent *nse,

IOD_PROPSET(iod, IOD_REGISTERED);
iod->watched_events = EV_NONE;
kqueue_iod_modify(nsp, iod, ev, EV_NONE);

kqueue_iod_modify(nsp, iod, nse, ev, EV_NONE);

if (nsock_iod_get_sd(iod) > kinfo->maxfd)
kinfo->maxfd = nsock_iod_get_sd(iod);
Expand All @@ -175,7 +175,7 @@ int kqueue_iod_unregister(struct npool *nsp, struct niod *iod) {
/* some IODs can be unregistered here if they're associated to an event that was
* immediately completed */
if (IOD_PROPGET(iod, IOD_REGISTERED)) {
kqueue_iod_modify(nsp, iod, EV_NONE, EV_READ|EV_WRITE);
kqueue_iod_modify(nsp, iod, NULL, EV_NONE, EV_READ|EV_WRITE);
IOD_PROPCLR(iod, IOD_REGISTERED);

if (nsock_iod_get_sd(iod) == kinfo->maxfd)
Expand Down

0 comments on commit f6db673

Please sign in to comment.