X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_request_pool_api.c;h=250783d912dd4c28ecc385f3a4d6ed7b651ccef8;hb=4338b6468498ec4d05535837608695f282dc871f;hp=ce1257e4dcb42555e65e3e570e39df1c81e92d4f;hpb=5eab9789044c40c91512d27ba5663cdf04b8b972;p=m6w6%2Fext-http diff --git a/http_request_pool_api.c b/http_request_pool_api.c index ce1257e..250783d 100644 --- a/http_request_pool_api.c +++ b/http_request_pool_api.c @@ -301,6 +301,8 @@ PHP_HTTP_API void _http_request_pool_dtor(http_request_pool *pool) efree(pool->timeout); #endif + http_request_pool_detach_all(pool); + pool->unfinished = 0; zend_llist_clean(&pool->finished); zend_llist_clean(&pool->handles); @@ -382,9 +384,8 @@ void _http_request_pool_responsehandler(http_request_pool *pool) msg = curl_multi_info_read(pool->ch, &remaining); if (msg && CURLMSG_DONE == msg->msg) { if (CURLE_OK != msg->data.result) { - http_request *r = NULL; - curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &r); - http_error_ex(HE_WARNING, HTTP_E_REQUEST, "%s; %s (%s)", curl_easy_strerror(msg->data.result), r?r->_error:"", r?r->url:""); + http_request_storage *st = http_request_storage_get(msg->easy_handle); + http_error_ex(HE_WARNING, HTTP_E_REQUEST, "%s; %s (%s)", curl_easy_strerror(msg->data.result), st?st->errorbuffer:"", st?st->url:""); } http_request_pool_apply_with_arg(pool, _http_request_pool_apply_responsehandler, msg->easy_handle); }