Commit Diff
Diff:
b9b77f5344ba6d6116044360feb3a7927778169f
89efa81bcc2b069fa1cca7c1868bd056f2a38f74
Commit:
89efa81bcc2b069fa1cca7c1868bd056f2a38f74
Tree:
a28f74264c9de746480433503ae70c25e00f4ccf
Author:
Omar Polo <op@omarpolo.com>
Date:
Thu Jan 27 09:53:43 2022 UTC
Message:
set REQUEST_PROXY only when proxy_init is successful
commit - b9b77f5344ba6d6116044360feb3a7927778169f
commit + 89efa81bcc2b069fa1cca7c1868bd056f2a38f74
blob - 6f892c07b0ce77157f4e83b4bebf13921ad90164
blob + fa316748ccb8ca551beb05dce98826b09e20de36
--- proxy.c
+++ proxy.c
@@ -346,13 +346,13 @@ proxy_init(struct client *c)
proxy_init(struct client *c)
{
struct proxy *p = c->proxy;
+
+ if (!p->notls && proxy_setup_tls(c) == -1)
+ return -1;
+ else if (p->notls)
+ proxy_enqueue_req(c);
c->type = REQUEST_PROXY;
- if (p->notls) {
- proxy_enqueue_req(c);
- return 0;
- }
-
- return proxy_setup_tls(c);
+ return 0;
}
Omar Polo