From cefdd26d62e01878b8e8acbb78a8fcc477a63fd9 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Thu, 12 Dec 2024 09:52:45 +0300 Subject: libcurl: update to 8.11.1 --- libs/libcurl/src/multi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libs/libcurl/src/multi.c') diff --git a/libs/libcurl/src/multi.c b/libs/libcurl/src/multi.c index d89657e2f3..b79a577d9e 100644 --- a/libs/libcurl/src/multi.c +++ b/libs/libcurl/src/multi.c @@ -1541,6 +1541,9 @@ CURLMcode curl_multi_wakeup(CURLM *m) if(multi->wakeup_pair[1] != CURL_SOCKET_BAD) { #ifdef USE_EVENTFD buf = &val; + /* eventfd has a stringent rule of requiring the 8-byte buffer when + calling write(2) on it, which makes the sizeof(buf) below fine since + this is only used on 64-bit systems and then the pointer is 64-bit */ #else buf[0] = 1; #endif @@ -3586,6 +3589,14 @@ static CURLMcode multi_socket(struct Curl_multi *multi, } } } + else { + /* Asked to run due to time-out. Clear the 'last_expire_ts' variable to + force Curl_update_timer() to trigger a callback to the app again even + if the same timeout is still the one to run after this call. That + handles the case when the application asks libcurl to run the timeout + prematurely. */ + memset(&multi->last_expire_ts, 0, sizeof(multi->last_expire_ts)); + } result = multi_run_expired(&mrc); if(result) -- cgit v1.2.3