fix status for active provider connections

This commit is contained in:
euzu
2025-04-12 18:35:16 +02:00
parent 4ac36548e0
commit 377e02cd49
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -82,6 +82,7 @@ impl ProviderConfig {
pub fn try_allocate(&self, grace: bool) -> ProviderAllocation {
let connections = self.current_connections.load(Ordering::SeqCst);
if self.max_connections == 0 {
self.current_connections.fetch_add(1, Ordering::SeqCst);
return ProviderAllocation::Available(self);
}
if (!grace && connections < self.max_connections) || (grace && connections <= self.max_connections) {