From b233d0c582a3c6f8d85b681074e4f1ac4678276d Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 7 Apr 2008 12:29:05 +0000 Subject: Patch from Brain: set MAX_DESCRIPTORS for all socket engines (I missed this) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9394 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengines/socketengine_iocp.cpp | 2 ++ src/socketengines/socketengine_kqueue.cpp | 1 + src/socketengines/socketengine_ports.cpp | 1 + src/socketengines/socketengine_select.cpp | 1 + 4 files changed, 5 insertions(+) diff --git a/src/socketengines/socketengine_iocp.cpp b/src/socketengines/socketengine_iocp.cpp index b27f96035..9ae394e56 100644 --- a/src/socketengines/socketengine_iocp.cpp +++ b/src/socketengines/socketengine_iocp.cpp @@ -17,6 +17,8 @@ IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) { + MAX_DESCRIPTORS = 10240; + /* Create completion port */ m_completionPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, (ULONG_PTR)0, 0); diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp index 214afc71c..7630ffb98 100644 --- a/src/socketengines/socketengine_kqueue.cpp +++ b/src/socketengines/socketengine_kqueue.cpp @@ -21,6 +21,7 @@ KQueueEngine::KQueueEngine(InspIRCd* Instance) : SocketEngine(Instance) { + MAX_DESCRIPTORS = 0; this->RecoverFromFork(); ke_list = new struct kevent[GetMaxFds()]; ref = new EventHandler* [GetMaxFds()]; diff --git a/src/socketengines/socketengine_ports.cpp b/src/socketengines/socketengine_ports.cpp index 113c6794e..01d9984c1 100644 --- a/src/socketengines/socketengine_ports.cpp +++ b/src/socketengines/socketengine_ports.cpp @@ -19,6 +19,7 @@ PortsEngine::PortsEngine(InspIRCd* Instance) : SocketEngine(Instance) { + MAX_DESCRIPTORS = 0; EngineHandle = port_create(); if (EngineHandle == -1) diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index 24c3d5637..3f5210f3c 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -20,6 +20,7 @@ SelectEngine::SelectEngine(InspIRCd* Instance) : SocketEngine(Instance) { + MAX_DESCRIPTORS = FD_SETSIZE; EngineHandle = 0; CurrentSetSize = 0; -- cgit v1.2.3