diff --git a/lib/url.c b/lib/url.c index 3b1ce3568..9f4716ed0 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3337,10 +3337,13 @@ static void reuse_conn(struct Curl_easy *data, temp->hostname_resolve = NULL; /* reuse init */ existing->bits.reuse = TRUE; /* yes, we are reusing here */ + if(temp->handler && temp->handler->disconnect) + temp->handler->disconnect(data, temp, TRUE); + Curl_conn_free(data, temp); } /** * create_conn() sets up a new connectdata struct, or reuses an already