Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conn: always set bits.close with connclose() #4690

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/http_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ static CURLcode https_proxy_connect(struct connectdata *conn, int sockindex)
Curl_ssl_connect_nonblocking(conn, sockindex,
&conn->bits.proxy_ssl_connected[sockindex]);
if(result)
conn->bits.close = TRUE; /* a failed connection is marked for closure to
prevent (bad) re-use or similar */
/* a failed connection is marked for closure to prevent (bad) re-use or
similar */
connclose(conn, "TLS handshake failed");
}
return result;
#else
Expand Down
2 changes: 1 addition & 1 deletion lib/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static CURLcode multi_done(struct Curl_easy *data,
) || conn->bits.close
|| (premature && !(conn->handler->flags & PROTOPT_STREAM))) {
CURLcode res2;
conn->bits.close = TRUE; /* forcibly prevents reuse */
connclose(conn, "disconnecting");
CONN_UNLOCK(data);
res2 = Curl_disconnect(data, conn, premature);

Expand Down