mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-23 00:03:33 +02:00
fix status for active provider connections
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user