mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
in Curl_disonnect(): call the protocol-specific disconnect function before we
unlink the "current" connection struct from the connection cache.
This commit is contained in:
parent
78f52c05a9
commit
82bd583251
@ -1325,16 +1325,16 @@ CURLcode Curl_disconnect(struct connectdata *conn)
|
|||||||
we shall forget. */
|
we shall forget. */
|
||||||
conn->data->state.authstage = 0;
|
conn->data->state.authstage = 0;
|
||||||
|
|
||||||
|
if(conn->curl_disconnect)
|
||||||
|
/* This is set if protocol-specific cleanups should be made */
|
||||||
|
conn->curl_disconnect(conn);
|
||||||
|
|
||||||
if(-1 != conn->connectindex) {
|
if(-1 != conn->connectindex) {
|
||||||
/* unlink ourselves! */
|
/* unlink ourselves! */
|
||||||
infof(conn->data, "Closing connection #%d\n", conn->connectindex);
|
infof(conn->data, "Closing connection #%d\n", conn->connectindex);
|
||||||
conn->data->state.connects[conn->connectindex] = NULL;
|
conn->data->state.connects[conn->connectindex] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(conn->curl_disconnect)
|
|
||||||
/* This is set if protocol-specific cleanups should be made */
|
|
||||||
conn->curl_disconnect(conn);
|
|
||||||
|
|
||||||
Curl_safefree(conn->proto.generic);
|
Curl_safefree(conn->proto.generic);
|
||||||
Curl_safefree(conn->newurl);
|
Curl_safefree(conn->newurl);
|
||||||
Curl_safefree(conn->path); /* the URL path part */
|
Curl_safefree(conn->path); /* the URL path part */
|
||||||
|
Loading…
Reference in New Issue
Block a user