From 6ec32dfafe61a805487e26558a8c2025ef25ef22 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 20 Aug 2013 10:20:15 +0000 Subject: [PATCH] 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 --- php_http_client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } -- 2.30.2