mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make Websocket send queue configurable
This commit is contained in:
committed by
Scott Schurr
parent
00c60d408a
commit
2e5ab4e0e3
@@ -205,6 +205,34 @@ parse_Port (ParsedPort& port, Section const& section, std::ostream& log)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
auto const result = section.find("send_queue_limit");
|
||||
if (result.second)
|
||||
{
|
||||
try
|
||||
{
|
||||
port.ws_queue_limit =
|
||||
beast::lexicalCastThrow<std::uint16_t>(result.first);
|
||||
|
||||
// Queue must be greater than 0
|
||||
if (port.ws_queue_limit == 0)
|
||||
Throw<std::exception>();
|
||||
}
|
||||
catch (std::exception const&)
|
||||
{
|
||||
log <<
|
||||
"Invalid value '" << result.first << "' for key " <<
|
||||
"'send_queue_limit' in [" << section.name() << "]\n";
|
||||
Rethrow();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default Websocket send queue size limit
|
||||
port.ws_queue_limit = 100;
|
||||
}
|
||||
}
|
||||
|
||||
populate (section, "admin", log, port.admin_ip, true, {});
|
||||
populate (section, "secure_gateway", log, port.secure_gateway_ip, false,
|
||||
port.admin_ip.get_value_or({}));
|
||||
|
||||
Reference in New Issue
Block a user