mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 09:17:57 +00:00
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:
@@ -78,7 +78,14 @@ SSLHTTPPeer::SSLHTTPPeer (Port const& port, Handler& handler,
|
||||
void
|
||||
SSLHTTPPeer::run()
|
||||
{
|
||||
handler_.onAccept (session());
|
||||
if (!handler_.onAccept (session(), remote_address_))
|
||||
{
|
||||
boost::asio::spawn (strand_,
|
||||
std::bind (&SSLHTTPPeer::do_close,
|
||||
shared_from_this()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (! stream_.lowest_layer().is_open())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user