/* {{{ STATUS http_request_pool_select(http_request_pool *) */
PHP_HTTP_API STATUS _http_request_pool_select(http_request_pool *pool)
+{
+ return http_request_pool_select_ex(pool, NULL);
+}
+/* }}} */
+
+/* {{{ STATUS http_request_pool_select_ex(http_request_pool *, struct timeval *) */
+PHP_HTTP_API STATUS _http_request_pool_select_ex(http_request_pool *pool, struct timeval *custom_timeout)
{
int MAX;
fd_set R, W, E;
}
#endif
- http_request_pool_timeout(pool, &timeout);
+ if (custom_timeout && timerisset(custom_timeout)) {
+ timeout = *custom_timeout;
+ } else {
+ http_request_pool_timeout(pool, &timeout);
+ }
FD_ZERO(&R);
FD_ZERO(&W);