From 8ff3743f5e99c693710bc446bfd595687156ca6b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 29 Sep 2021 11:26:12 +0300 Subject: Revert "doc: Remove outdated comments" This reverts commit ee7891a0c412728cf8bec667f25263682a9baaaf, and moves the comments into the right place. --- src/init.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/init.cpp b/src/init.cpp index 25b9c6b9ec..df0c753b04 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -878,6 +878,8 @@ bool AppInitParameterInteraction(const ArgsManager& args) #else int fd_max = FD_SETSIZE; #endif + // Trim requested connection counts, to fit into system limitations + // in std::min(...) to work around FreeBSD compilation issue described in #2695 nMaxConnections = std::max(std::min(nMaxConnections, fd_max - nBind - MIN_CORE_FILEDESCRIPTORS - MAX_ADDNODE_CONNECTIONS - NUM_FDS_MESSAGE_CAPTURE), 0); if (nFD < MIN_CORE_FILEDESCRIPTORS) return InitError(_("Not enough file descriptors available.")); -- cgit v1.2.3