From b7680263aa5e5e66ad5d045a468ea3297235a849 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 15 Feb 2015 14:11:30 +1100 Subject: [PATCH] Set subproxies to disabled when dropping them --- src/generator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index ed6e69b4..0c96851a 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1519,8 +1519,10 @@ static void drop_subproxies(proxy_instance_t *proxi) mutex_lock(&proxi->proxy_lock); HASH_ITER(sh, proxi->subproxies, subproxy, tmp) { - if (!parent_proxy(subproxy)) + if (!parent_proxy(subproxy)) { + subproxy->disabled = true; Close(subproxy->cs->fd); + } } mutex_unlock(&proxi->proxy_lock); }