From a129d4c57906b41ef35967092ce1aff3d8b8fcc2 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 21 Sep 2015 17:36:46 +1000 Subject: [PATCH] Sort out alive message and reconnect in passthrough_recv --- src/generator.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/generator.c b/src/generator.c index d560199e..5304d247 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1908,12 +1908,13 @@ static void *passthrough_recv(void *arg) int ret; while (!proxy_alive(ckp, proxi, cs, true)) { - if (alive) { - alive = false; - reconnect_generator(ckp); - } + alive = false; sleep(5); } + if (!alive) { + reconnect_generator(ckp); + alive = true; + } /* Make sure we receive a line within 90 seconds */ ret = read_socket_line(cs, &timeout);