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);