diff options
Diffstat (limited to 'src/socketengine_kqueue.cpp')
-rw-r--r-- | src/socketengine_kqueue.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp index b56ca264c..4d0039903 100644 --- a/src/socketengine_kqueue.cpp +++ b/src/socketengine_kqueue.cpp @@ -80,7 +80,7 @@ bool KQueueEngine::AddFd(EventHandler* eh) return true; } -bool KQueueEngine::DelFd(EventHandler* eh) +bool KQueueEngine::DelFd(EventHandler* eh, bool force) { int fd = eh->GetFd(); @@ -91,12 +91,12 @@ bool KQueueEngine::DelFd(EventHandler* eh) EV_SET(&ke, eh->GetFd(), EVFILT_READ, EV_DELETE, 0, 0, NULL); int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); - + EV_SET(&ke, eh->GetFd(), EVFILT_WRITE, EV_DELETE, 0, 0, NULL); int j = kevent(EngineHandle, &ke, 1, 0, 0, NULL); - if ((j < 0) && (i < 0)) + if ((j < 0) && (i < 0) && !force) return false; CurrentSetSize--; @@ -151,7 +151,7 @@ int KQueueEngine::DispatchEvents() } if (ke_list[j].flags & EVFILT_WRITE) { - /* This looks wrong but its right. As above, theres no modify + /* This looks wrong but its right. As above, theres no modify * call in kqueue. See the manpage. */ struct kevent ke; |