From 7dadb07a19280936147b91144f27d8528ba35c7c Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 2 Apr 2008 19:52:33 +0000 Subject: 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 --- src/socketengines/socketengine_kqueue.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/socketengines') 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); -- cgit v1.2.3