diff options
Diffstat (limited to 'src/socketengine_kqueue.cpp')
-rw-r--r-- | src/socketengine_kqueue.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp index 15d0e30bc..ef5c507a1 100644 --- a/src/socketengine_kqueue.cpp +++ b/src/socketengine_kqueue.cpp @@ -94,9 +94,6 @@ bool KQueueEngine::DelFd(EventHandler* eh) struct kevent ke; EV_SET(&ke, fd, eh->Readable() ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL); - CurrentSetSize--; - ref[fd] = NULL; - int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); if (i == -1) { @@ -104,6 +101,9 @@ bool KQueueEngine::DelFd(EventHandler* eh) return false; } + CurrentSetSize--; + ref[fd] = NULL; + return true; } |