#include "php_output.h"
#include "ext/standard/url.h"
+#include "ext/standard/php_lcg.h"
#include "php_http_api.h"
#include "php_http_send_api.h"
case CURLE_RECV_ERROR:
case CURLE_SSL_ENGINE_INITFAILED:
case CURLE_LOGIN_DENIED:
- if (request->_retry.delay) {
+ if (request->_retry.delay >= HTTP_DIFFSEC) {
http_sleep(request->_retry.delay);
}
goto retry;
TSRMLS_SET_CTX(pool->tsrm_ls);
-#if HTTP_HAVE_EVENT
+#ifdef HTTP_HAVE_EVENT
pool->timeout = ecalloc(1, sizeof(struct event));
curl_multi_setopt(pool->ch, CURLMOPT_SOCKETDATA, pool);
curl_multi_setopt(pool->ch, CURLMOPT_SOCKETFUNCTION, http_request_pool_socket_callback);
fprintf(stderr, "Destructing request pool %p\n", pool);
#endif
-#if HTTP_HAVE_EVENT
+#ifdef HTTP_HAVE_EVENT
efree(pool->timeout);
#endif
#include "php_http.h"
#include "php_streams.h"
-#include "ext/standard/php_lcg.h"
#include "php_http_api.h"
#include "php_http_cache_api.h"