diff options
Diffstat (limited to 'libs/libcurl/src/multi.c')
-rw-r--r-- | libs/libcurl/src/multi.c | 11 |
1 files changed, 11 insertions, 0 deletions
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)
|