Refactor user connection limit checks and enhance health monitoring tests: update warning messages, add new tests for draining writers, and improve state management

This commit is contained in:
David Osipov
2026-03-17 20:53:37 +04:00
parent 2c06288b40
commit 60953bcc2c
5 changed files with 899 additions and 8 deletions

View File

@@ -878,7 +878,7 @@ impl RunningClientHandler {
{
Ok(reservation) => reservation,
Err(e) => {
warn!(user = %user, error = %e, "User limit exceeded");
warn!(user = %user, error = %e, "User admission check failed");
return Err(e);
}
};
@@ -998,8 +998,8 @@ impl RunningClientHandler {
#[cfg(test)]
async fn check_user_limits_static(
user: &str,
config: &ProxyConfig,
user: &str,
config: &ProxyConfig,
stats: &Stats,
peer_addr: SocketAddr,
ip_tracker: &UserIpTracker,