diff options
author | Omar Polo <op@omarpolo.com> | 2022-01-27 09:53:43 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-01-27 09:53:43 +0000 |
commit | 89efa81bcc2b069fa1cca7c1868bd056f2a38f74 (patch) | |
tree | a28f74264c9de746480433503ae70c25e00f4ccf /proxy.c | |
parent | b9b77f5344ba6d6116044360feb3a7927778169f (diff) |
set REQUEST_PROXY only when proxy_init is successful
Diffstat (limited to 'proxy.c')
-rw-r--r-- | proxy.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -347,12 +347,12 @@ proxy_init(struct client *c) { struct proxy *p = c->proxy; - c->type = REQUEST_PROXY; - - if (p->notls) { + if (!p->notls && proxy_setup_tls(c) == -1) + return -1; + else if (p->notls) proxy_enqueue_req(c); - return 0; - } - return proxy_setup_tls(c); + c->type = REQUEST_PROXY; + + return 0; } |