summaryrefslogtreecommitdiff
path: root/src/socketengine_kqueue.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 19:24:09 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 19:24:09 +0000
commit0c04ea89dbb1516423535b2f5fdadbdab9fe8e58 (patch)
tree7d599b208f24869822cc1c619a3de755852e0e34 /src/socketengine_kqueue.cpp
parent32bffd861fd1c8b723ae63f4ea66720fd47e7d0a (diff)
Set these back to sane operation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8271 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine_kqueue.cpp')
-rw-r--r--src/socketengine_kqueue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp
index 0f6f805ca..50f6242e2 100644
--- a/src/socketengine_kqueue.cpp
+++ b/src/socketengine_kqueue.cpp
@@ -59,7 +59,7 @@ bool KQueueEngine::AddFd(EventHandler* eh)
return false;
if (ref[fd])
- DelFd(ref[fd]);
+ return false;
struct kevent ke;
EV_SET(&ke, fd, eh->Readable() ? EVFILT_READ : EVFILT_WRITE, EV_ADD, 0, 0, NULL);
@@ -93,12 +93,12 @@ bool KQueueEngine::DelFd(EventHandler* eh, bool force)
int j = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
- CurrentSetSize--;
- ref[fd] = NULL;
-
if ((j < 0) && (i < 0) && !force)
return false;
+ CurrentSetSize--;
+ ref[fd] = NULL;
+
ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd);
return true;
}