- if (CURLM_OK == (rs = curl_multi_add_handle(curl->handle, handler->handle))) {
- zend_llist_add_element(&h->requests, enqueue);
- ++curl->unfinished;
-
- if (h->callback.progress.func && SUCCESS == php_http_client_getopt(h, PHP_HTTP_CLIENT_OPT_PROGRESS_INFO, enqueue->request, &progress)) {
- progress->info = "start";
- h->callback.progress.func(h->callback.progress.arg, h, &handler->queue, progress);
- progress->started = 1;
- }
-
- return SUCCESS;
- } else {
+ if (CURLM_OK != (rs = curl_multi_add_handle(curl->handle->multi, handler->handle))) {
+ php_http_client_curl_handler_dtor(handler);