summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-07 13:33:50 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-07 13:33:50 +0200
commit76f1ba946972dbff089b27d64748afc1c0d95c6a (patch)
tree3eb08ed1e394ad3e2a2e1a608a2cdfdb2816de88 /src
parent30fec322809582f91be70cc1bb16c9678180db76 (diff)
socketengine_epoll Pass a dummy value to epoll_create() that does not depend on GetMaxFds()
From man epoll: Since Linux 2.6.8, the size argument is unused, but must be greater than zero. (The kernel dynamically sizes the required data structures without needing this initial hint.)
Diffstat (limited to 'src')
-rw-r--r--src/socketengines/socketengine_epoll.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index a54907fca..1c4d8963d 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -54,8 +54,9 @@ void SocketEngine::Init()
ServerInstance->QuickExit(EXIT_STATUS_SOCKETENGINE);
}
- // This is not a maximum, just a hint at the eventual number of sockets that may be polled.
- EngineHandle = epoll_create(GetMaxFds() / 4);
+ // 128 is not a maximum, just a hint at the eventual number of sockets that may be polled,
+ // and it is completely ignored by 2.6.8 and later kernels, except it must be larger than zero.
+ EngineHandle = epoll_create(128);
if (EngineHandle == -1)
{