diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-07 13:47:26 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-07 13:47:26 +0200 |
commit | 5a6fd54f8fd217232f98804431928609580742bc (patch) | |
tree | 8bed7bfab1526fcd1ef691d2483cbb9400dcfd72 /src/configreader.cpp | |
parent | 76f1ba946972dbff089b27d64748afc1c0d95c6a (diff) |
Change the number reported by SocketEngine::GetMaxFds() to be informal
Do not exit if we can't determine it
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 77f61c978..15d9298b6 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -36,7 +36,6 @@ ServerConfig::ServerConfig() dns_timeout = 5; MaxTargets = 20; NetBufferSize = 10240; - SoftLimit = SocketEngine::GetMaxFds(); MaxConn = SOMAXCONN; MaxChans = 20; OperMaxChans = 30; @@ -366,7 +365,7 @@ void ServerConfig::Fill() if (!nsid.empty() && nsid != sid) throw CoreException("You must restart to change the server id"); } - SoftLimit = ConfValue("performance")->getInt("softlimit", SocketEngine::GetMaxFds(), 10, SocketEngine::GetMaxFds()); + SoftLimit = ConfValue("performance")->getInt("softlimit", (SocketEngine::GetMaxFds() > 0 ? SocketEngine::GetMaxFds() : LONG_MAX), 10); CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true); MaxConn = ConfValue("performance")->getInt("somaxconn", SOMAXCONN); XLineMessage = options->getString("xlinemessage", options->getString("moronbanner", "You're banned!")); |