summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_epoll.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-22 02:27:25 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-22 19:44:45 +0100
commitb1098712771ab823042fcf8614a706c76c2ff401 (patch)
tree7feb35687035b5ac6e1dd4181501400c31a54efc /src/socketengines/socketengine_epoll.cpp
parentd4414f54910aeaa4809a7eacea75a089a0820f40 (diff)
Convert GetMaxFds() to size_t and deduplicate setting code.
Diffstat (limited to 'src/socketengines/socketengine_epoll.cpp')
-rw-r--r--src/socketengines/socketengine_epoll.cpp7
1 files changed, 1 insertions, 6 deletions
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.