diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -655,7 +655,9 @@ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); gArgs.AddArg( "-maxconnections=", - strprintf("Maintain at most connections to peers (default: %u)", + strprintf("Maintain at most connections to peers. The effective " + "limit depends on system limitations and might be lower than " + "the specified value (default: %u)", DEFAULT_MAX_PEER_CONNECTIONS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); gArgs.AddArg("-maxreceivebuffer=", @@ -1772,10 +1774,12 @@ nMaxConnections); if (nMaxConnections < nUserMaxConnections) { - InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, " - "because of system limitations.") - .translated, - nUserMaxConnections, nMaxConnections)); + // Not categorizing as "Warning" because this is the normal behavior for + // platforms using the select() interface for which FD_SETSIZE is + // usually 1024. + LogPrintf("Reducing -maxconnections from %d to %d, because of system " + "limitations.\n", + nUserMaxConnections, nMaxConnections); } // Step 3: parameter-to-internal-flags diff --git a/src/net.h b/src/net.h --- a/src/net.h +++ b/src/net.h @@ -87,7 +87,11 @@ #else static const bool DEFAULT_UPNP = false; #endif -/** The maximum number of peer connections to maintain. */ +/** + * The maximum number of peer connections to maintain. + * This quantity might not be reachable on some systems, especially on platforms + * that do not provide a working poll() interface. + */ static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 4096; /** The default for -maxuploadtarget. 0 = Unlimited */ static const uint64_t DEFAULT_MAX_UPLOAD_TARGET = 0;