mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
New config file structure. (#201)
This commit is contained in:
committed by
GitHub
parent
1a954ad96e
commit
e835e18d18
@@ -18,7 +18,7 @@ namespace usr
|
||||
int handle_user_connect(usr::user_comm_session &session)
|
||||
{
|
||||
// Allow connection only if the maximum capacity is not reached. 0 means allowing unlimited connections.
|
||||
if ((conf::cfg.pubmaxcons == 0) || (usr::ctx.users.size() < conf::cfg.pubmaxcons))
|
||||
if ((conf::cfg.user.max_connections == 0) || (usr::ctx.users.size() < conf::cfg.user.max_connections))
|
||||
{
|
||||
corebill::add_to_whitelist(session.host_address);
|
||||
LOG_DEBUG << "User client connected " << session.display_name();
|
||||
@@ -35,7 +35,7 @@ namespace usr
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG << "Dropping the user connection. Maximum user capacity reached. Session: " << session.display_name() << " (limit: " << conf::cfg.pubmaxcons << ").";
|
||||
LOG_DEBUG << "Dropping the user connection. Maximum user capacity reached. Session: " << session.display_name() << " (limit: " << conf::cfg.user.max_connections << ").";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user