From ca8d50280d8f9046788268befc516dfe187466f0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 14 Feb 2015 14:51:37 +1100 Subject: [PATCH] Only set alive to false on parent proxy failing --- src/generator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index fecf0895..3a769e14 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1794,10 +1794,11 @@ static void *proxy_recv(void *arg) ret = read_socket_line(cs, 5); } if (ret < 1) { - if (alive) { + if (alive && parent_proxy(subproxy)) { alive = false; LOGWARNING("Proxy %d:%s failed to epoll/read_socket_line in proxy_recv, attempting reconnect", subproxy->id, subproxy->si->url); + send_proc(ckp->generator, "reconnect"); } continue; }