From 7b562c4b78c9bfb36210e0662ab994c159bc7434 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sat, 9 Jan 2021 11:50:44 +0100 Subject: [PATCH] Reverse proxy printing debug message always --- src/rev_proxy.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/rev_proxy.c b/src/rev_proxy.c index 8f77216..f34544f 100644 --- a/src/rev_proxy.c +++ b/src/rev_proxy.c @@ -23,11 +23,11 @@ int rev_proxy_init(http_req *req, http_res *res, host_config *conf, sock *client goto rev_proxy; } + retry: if (rev_proxy.socket != 0) { + print(BLUE_STR "Closing proxy connection" CLR_STR); sock_close(&rev_proxy); } - - retry: retry = 0; tries++; @@ -225,12 +225,7 @@ int rev_proxy_init(http_req *req, http_res *res, host_config *conf, sock *client return 0; proxy_err: - print(BLUE_STR "Closing proxy connection" CLR_STR); - sock_close(&rev_proxy); - if (retry) { - goto retry; - } - + if (retry) goto retry; return -1; }