1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From 798a561a0763cc92473e25238935242c2289fb98 Mon Sep 17 00:00:00 2001
From: Michael Wallner <mike@php.net>
Date: Mon, 21 Feb 2022 11:04:09 +0100
Subject: [PATCH] fix recursive calls to curl_multi API from the user handler
---
src/php_http_client_curl_user.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/php_http_client_curl_user.c b/src/php_http_client_curl_user.c
index 1f69a51..95ea6f5 100644
--- a/src/php_http_client_curl_user.c
+++ b/src/php_http_client_curl_user.c
@@ -57,9 +57,7 @@ static void php_http_client_curl_user_timer(CURLM *multi, long timeout_ms, void
fprintf(stderr, "\ntimer <- timeout_ms: %ld\n", timeout_ms);
#endif
- if (timeout_ms <= 0) {
- php_http_client_curl_loop(context->client, CURL_SOCKET_TIMEOUT, 0);
- } else {
+ if (timeout_ms >= 0) {
zval args[1], *ztimeout = &args[0];
ZVAL_LONG(ztimeout, timeout_ms);
From 2653f8b3a2bf9a6d9cded6ef46236de18a02ff77 Mon Sep 17 00:00:00 2001
From: Michael Wallner <mike@php.net>
Date: Mon, 21 Feb 2022 11:06:19 +0100
Subject: [PATCH] fix recursive calls to curl_multi API from the event handler
---
src/php_http_client_curl_event.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/php_http_client_curl_event.c b/src/php_http_client_curl_event.c
index b8db1b2..2e663ed 100644
--- a/src/php_http_client_curl_event.c
+++ b/src/php_http_client_curl_event.c
@@ -97,8 +97,6 @@ static void php_http_client_curl_event_timer(CURLM *multi, long timeout_ms, void
}
break;
case 0:
- php_http_client_curl_event_handler(context, CURL_SOCKET_TIMEOUT, 0);
- break;
default:
if (!event_initialized(context->timeout)) {
event_assign(context->timeout, context->evbase, CURL_SOCKET_TIMEOUT, 0, php_http_client_curl_event_timeout_callback, context);
|