summaryrefslogtreecommitdiff
path: root/src/socketengines
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-02 19:52:33 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-02 19:52:33 +0000
commit7dadb07a19280936147b91144f27d8528ba35c7c (patch)
tree806ce6c1e2506606b2b88531a9714a0241b521ec /src/socketengines
parent0ba0beb0c465cd7bfbd98b6f51429d3147c362eb (diff)
Fix peavey and w00ts bug they found by removing the nonblocking part of the logger. This stuff was hackish and isnt required. If your hard disk locks up, then you have bigger worries.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9276 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengines')
-rw-r--r--src/socketengines/socketengine_kqueue.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp
index f21d2e710..214afc71c 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -104,7 +104,7 @@ bool KQueueEngine::DelFd(EventHandler* eh, bool force)
CurrentSetSize--;
ref[fd] = NULL;
- ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd);
+ //ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd);
return true;
}
@@ -169,9 +169,12 @@ int KQueueEngine::DispatchEvents()
/* This looks wrong but its right. As above, theres no modify
* call in kqueue. See the manpage.
*/
- struct kevent ke;
- EV_SET(&ke, ke_list[j].ident, EVFILT_READ, EV_ADD, 0, 0, NULL);
- kevent(EngineHandle, &ke, 1, 0, 0, NULL);
+ if (ref[ke_list[j].ident]->Readable())
+ {
+ struct kevent ke;
+ EV_SET(&ke, ke_list[j].ident, EVFILT_READ, EV_ADD, 0, 0, NULL);
+ kevent(EngineHandle, &ke, 1, 0, 0, NULL);
+ }
WriteEvents++;
if (ref[ke_list[j].ident])
ref[ke_list[j].ident]->HandleEvent(EVENT_WRITE);