User connection remove fix

This commit is contained in:
euzu
2025-06-11 15:52:23 +02:00
parent 9e9fa4f77f
commit 5d0a9fbff7
+8 -4
View File
@@ -196,10 +196,14 @@ impl ActiveUserManager {
connection_data.connections -= 1;
}
if connection_data.connections == 0 || connection_data.connections < connection_data.max_connections {
// Grace timeout expired, reset grace counters
connection_data.granted_grace = false;
connection_data.grace_ts = 0;
if connection_data.connections == 0 {
lock.remove(username);
} else {
if connection_data.connections < connection_data.max_connections {
// Grace timeout expired, reset grace counters
connection_data.granted_grace = false;
connection_data.grace_ts = 0;
}
}
}
drop(lock);