|
|
@ -2020,11 +2020,13 @@ out: |
|
|
|
if (ret) { |
|
|
|
if (ret) { |
|
|
|
proxy_instance_t *parent = proxi->parent; |
|
|
|
proxy_instance_t *parent = proxi->parent; |
|
|
|
|
|
|
|
|
|
|
|
mutex_lock(&parent->proxy_lock); |
|
|
|
if (parent) { |
|
|
|
parent->recruit -= proxi->clients_per_proxy; |
|
|
|
mutex_lock(&parent->proxy_lock); |
|
|
|
if (parent->recruit < 0) |
|
|
|
parent->recruit -= proxi->clients_per_proxy; |
|
|
|
parent->recruit = 0; |
|
|
|
if (parent->recruit < 0) |
|
|
|
mutex_unlock(&parent->proxy_lock); |
|
|
|
parent->recruit = 0; |
|
|
|
|
|
|
|
mutex_unlock(&parent->proxy_lock); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|