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
Родитель e85881d7ec
Коммит 8341e8e502
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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;
}