Browse Source

Prevent passthrough and node etc. failure in generator at startup due to proxy recruit change.

master
Con Kolivas 8 years ago
parent
commit
07d57d683d
  1. 2
      src/generator.c

2
src/generator.c

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

Loading…
Cancel
Save