set REQUEST_PROXY only when proxy_init is successful

This commit is contained in:
Omar Polo 2022-01-27 09:53:43 +00:00
parent b9b77f5344
commit 89efa81bcc
1 changed files with 6 additions and 6 deletions

12
proxy.c
View File

@ -347,12 +347,12 @@ 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;
}