X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_client_curl.c;h=37f255b733d7ed3a2fd8c6cd8564dfa15c5c3e0e;hp=b688497380aa49e02470be989ec920c2f47ee21f;hb=976b54c3817a2a1f6cc86077a6a5116a0b8f8b18;hpb=9aaa57412ed0cf724e9dd81f365b02f1d56ad623 diff --git a/php_http_client_curl.c b/php_http_client_curl.c index b688497..37f255b 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1736,6 +1736,9 @@ static void php_http_client_curl_dtor(php_http_client_t *h) #if PHP_HTTP_HAVE_EVENT if (curl->timeout) { + if (event_initialized(curl->timeout) && event_pending(curl->timeout, EV_TIMEOUT, NULL)) { + event_del(curl->timeout); + } efree(curl->timeout); curl->timeout = NULL; }