From b1098712771ab823042fcf8614a706c76c2ff401 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 22 Oct 2017 02:27:25 +0100 Subject: Convert GetMaxFds() to size_t and deduplicate setting code. --- src/socketengines/socketengine_epoll.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/socketengines/socketengine_epoll.cpp') diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp index c442e340d..dc10a3613 100644 --- a/src/socketengines/socketengine_epoll.cpp +++ b/src/socketengines/socketengine_epoll.cpp @@ -38,12 +38,7 @@ namespace void SocketEngine::Init() { - // MAX_DESCRIPTORS is mainly used for display purposes, no problem if getrlimit() fails - struct rlimit limit; - if (!getrlimit(RLIMIT_NOFILE, &limit)) - { - MAX_DESCRIPTORS = limit.rlim_cur; - } + LookupMaxFds(); // 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. -- cgit v1.3.1-10-gc9f91