aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-01 07:19:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-01 07:19:26 +0000
commit82bd583251251f59ada527f4d5197a021676685a (patch)
treec9ec69e23dd2e33f2217097c4835afc30c4e6a91
parent78f52c05a9e16811909505896a68f0ed374ab8b3 (diff)
in Curl_disonnect(): call the protocol-specific disconnect function before we
unlink the "current" connection struct from the connection cache.
-rw-r--r--lib/url.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index 78c25aebc..e9dc7a02b 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1325,16 +1325,16 @@ CURLcode Curl_disconnect(struct connectdata *conn)
we shall forget. */
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) {
/* unlink ourselves! */
infof(conn->data, "Closing connection #%d\n", conn->connectindex);
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->newurl);
Curl_safefree(conn->path); /* the URL path part */