1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Clear the connection pointer after the async resolve has failed.

This cures the problem reported by Giuseppe Attardi on October 12, 2003.
This commit is contained in:
Daniel Stenberg 2003-10-13 12:21:56 +00:00
parent e85881d7ec
commit 8341e8e502

View File

@ -370,6 +370,11 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
to the WAITCONNECT state */
easy->result = Curl_async_resolved(easy->easy_conn);
if(CURLE_OK != easy->result)
/* if Curl_async_resolved() returns failure, the connection struct
is already freed and gone */
easy->easy_conn = NULL; /* no more connection */
easy->state = CURLM_STATE_WAITCONNECT;
}