ConnectPlease() fixed for the new proxy connect functionality to make sure
'connected' truly is false when the socks connect fails. Curl_done() fixed for the check-conn->bits.done-before-Curl_getoff_all_pipelines case
This commit is contained in:
parent
ddb0b8d8b8
commit
fd5e69f769
18
lib/url.c
18
lib/url.c
@ -2886,7 +2886,8 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
|
|||||||
if(*connected)
|
if(*connected)
|
||||||
result = Curl_connected_proxy(conn);
|
result = Curl_connected_proxy(conn);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if(result)
|
||||||
*connected = FALSE; /* mark it as not connected */
|
*connected = FALSE; /* mark it as not connected */
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -4777,18 +4778,21 @@ CURLcode Curl_done(struct connectdata **connp,
|
|||||||
|
|
||||||
Curl_expire(data, 0); /* stop timer */
|
Curl_expire(data, 0); /* stop timer */
|
||||||
|
|
||||||
if(conn->bits.done ||
|
if(conn->bits.done)
|
||||||
(conn->send_pipe->size + conn->recv_pipe->size != 0 &&
|
/* Stop if Curl_done() has already been called */
|
||||||
|
return CURLE_OK;
|
||||||
|
|
||||||
|
Curl_getoff_all_pipelines(data, conn);
|
||||||
|
|
||||||
|
if((conn->send_pipe->size + conn->recv_pipe->size != 0 &&
|
||||||
!data->set.reuse_forbid &&
|
!data->set.reuse_forbid &&
|
||||||
!conn->bits.close))
|
!conn->bits.close))
|
||||||
/* Stop if Curl_done() has already been called or pipeline
|
/* Stop if pipeline is not empty and we do not have to close
|
||||||
is not empty and we do not have to close connection. */
|
connection. */
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
||||||
conn->bits.done = TRUE; /* called just now! */
|
conn->bits.done = TRUE; /* called just now! */
|
||||||
|
|
||||||
Curl_getoff_all_pipelines(data, conn);
|
|
||||||
|
|
||||||
/* Cleanup possible redirect junk */
|
/* Cleanup possible redirect junk */
|
||||||
if(data->req.newurl) {
|
if(data->req.newurl) {
|
||||||
free(data->req.newurl);
|
free(data->req.newurl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user