X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_client_curl.c;h=27ebd02682790897a238e4051efe7120cdd58a5b;hp=1ec6624cc21a07b7e3d6957b398621b393ff989d;hb=e5df73ae2e31faa4e5a7de57409734f4cecd4c4a;hpb=78b58967b4befb4118572312f82f63d77e102b41 diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 1ec6624..27ebd02 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -2233,16 +2233,17 @@ static int php_http_client_curl_once(php_http_client_t *h) { php_http_client_curl_t *curl = h->ctx; - if (curl->ev_ops) { - curl->ev_ops->once(curl->ev_ctx); - } else { - while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(curl->handle->multi, &curl->unfinished)); - } + if (!h->callback.depth) { + if (curl->ev_ops) { + curl->ev_ops->once(curl->ev_ctx); + } else { + while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(curl->handle->multi, &curl->unfinished)); + } - php_http_client_curl_responsehandler(h); + php_http_client_curl_responsehandler(h); + } return curl->unfinished; - } static ZEND_RESULT_CODE php_http_client_curl_exec(php_http_client_t *h)