From 8476d128762720493e4ad81060c9a21c047e03ca Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 14 Feb 2015 16:21:27 +1100 Subject: [PATCH] Fix failover of parent proxy --- src/generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generator.c b/src/generator.c index fc1ad22b..c23b7da8 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1753,8 +1753,8 @@ static void *proxy_recv(void *arg) LOGWARNING("Proxy %d:%s recovered", proxi->id, proxi->si->url); proxi->reconnect_time = 0; send_proc(ckp->generator, "reconnect"); + alive = true; } - alive = true; now = time(NULL); @@ -1788,7 +1788,7 @@ static void *proxy_recv(void *arg) ret = read_socket_line(cs, 5); } if (ret < 1) { - if (alive && parent_proxy(subproxy)) { + if (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);