Check file handle limit on startup (RIPD-442, RIPD-1024):

Calculate the number of file descriptors that are needed during
execution based on the configuration file, with a hard floor
of 1024, adjusting the limit if possible. Refuse to run if enough
fds are not available.

Additionally, allow administrators to limit the number of incoming
connections a configured port will accept. By default no limit is
imposed.
This commit is contained in:
Nik Bougalis
2016-04-08 09:39:09 -07:00
parent 79ca82c078
commit 47eb4da080
25 changed files with 265 additions and 88 deletions

View File

@@ -775,6 +775,12 @@ OverlayImpl::size()
return ids_.size ();
}
int
OverlayImpl::limit()
{
return m_peerFinder->config().maxPeers;
}
Json::Value
OverlayImpl::crawl()
{