mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Added element limits for queue and lists (#162)
This commit is contained in:
@@ -201,6 +201,13 @@ namespace usr
|
||||
*/
|
||||
int add_user(usr::user_comm_session &session, const std::string &pubkey_hex, std::string_view protocol_code)
|
||||
{
|
||||
// If max number of user connections reached skip the rest.
|
||||
if (ctx.users.size() == MAX_USER_COUNT)
|
||||
{
|
||||
LOG_DEBUG << "Rejecting " + session.display_name() << ". Maximum user count reached.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Decode hex pubkey and get binary pubkey. We are only going to keep
|
||||
// the binary pubkey due to reduced memory footprint.
|
||||
std::string pubkey;
|
||||
|
||||
Reference in New Issue
Block a user