- Jeff Pohlmeyer identified two problems: first a rather obscure problem with

the multi interface and connection re-use that could make a
  curl_multi_remove_handle() ruin a pointer in another handle.

  The second problem was less of an actual problem but more of minor quirk:
  the re-using of connections wasn't properly checking if the connection was
  marked for closure.
This commit is contained in:
Daniel Stenberg 2007-02-18 23:02:42 +00:00
parent 300cbc2e21
commit cbf58d88d0
6 changed files with 30 additions and 20 deletions

View file

@ -542,11 +542,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
}
/* if we have a connection we must call Curl_done() here so that we
don't leave a half-baked one around */
if(easy->easy_conn) {
/* Set up the association right */
easy->easy_conn->data = easy->easy_handle;
/* we must call Curl_done() here (if we still "own it") so that we don't
leave a half-baked one around */
if(easy->easy_conn &&
(easy->easy_conn->data == easy->easy_handle)) {
/* Curl_done() clears the conn->data field to lose the association
between the easy handle and the connection */