From: Michael Wallner Date: Tue, 20 Aug 2013 10:20:15 +0000 (+0000) Subject: reset the client when destructing; X-Git-Tag: RELEASE_2_1_0_RC3~10^2^2~22 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6ec32dfafe61a805487e26558a8c2025ef25ef22;p=m6w6%2Fext-http reset the client when destructing; this ensures any attached requests will be dequeued and in case of using persistent handles can be property re-used --- diff --git a/php_http_client.c b/php_http_client.c index 1f4e09a..2306b04 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -199,13 +199,12 @@ PHP_HTTP_API php_http_client_t *php_http_client_copy(php_http_client_t *from, ph PHP_HTTP_API void php_http_client_dtor(php_http_client_t *h) { + php_http_client_reset(h); + if (h->ops->dtor) { h->ops->dtor(h); } - zend_llist_clean(&h->requests); - zend_llist_clean(&h->responses); - php_resource_factory_free(&h->rf); }