summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http_proxy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 43bbe73d5..2e0c8d35f 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -489,9 +489,12 @@ static CURLcode CONNECT(struct connectdata *conn,
}
else
s->keepon = KEEPON_DONE;
- if(!s->cl)
+
+ if(s->keepon == KEEPON_DONE && !s->cl)
/* we did the full CONNECT treatment, go to COMPLETE */
s->tunnel_state = TUNNEL_COMPLETE;
+
+ DEBUGASSERT(s->keepon == KEEPON_IGNORE || s->keepon == KEEPON_DONE);
continue;
}