projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- proper request pool cleanup
[m6w6/ext-http]
/
http_methods.c
diff --git
a/http_methods.c
b/http_methods.c
index cf8f25dd371807f818f86f264b739034694c4aeb..053fce7b232ee97845beb5a62b98d7bcbbbd38ff 100644
(file)
--- a/
http_methods.c
+++ b/
http_methods.c
@@
-2119,7
+2119,7
@@
PHP_METHOD(HttpRequest, send)
SET_EH_THROW_HTTP();
SET_EH_THROW_HTTP();
- if (obj->
attached
) {
+ if (obj->
pool
) {
http_error(E_WARNING, HTTP_E_CURL, "You cannot call HttpRequest::send() while attached to an HttpRequestPool");
RETURN_FALSE;
}
http_error(E_WARNING, HTTP_E_CURL, "You cannot call HttpRequest::send() while attached to an HttpRequestPool");
RETURN_FALSE;
}
@@
-2153,6
+2153,15
@@
PHP_METHOD(HttpRequestPool, __construct)
}
/* }}} */
}
/* }}} */
+PHP_METHOD(HttpRequestPool, __destruct)
+{
+ getObject(http_requestpool_object, obj);
+
+ NO_ARGS;
+
+ http_requestpool_object_ondestruct(&obj->pool);
+}
+
/* {{{ proto bool HttpRequestPool::attach(HttpRequest request)
*
* Attach an HttpRequest object to this HttpRequestPool.
/* {{{ proto bool HttpRequestPool::attach(HttpRequest request)
*
* Attach an HttpRequest object to this HttpRequestPool.