mirror of
https://github.com/curl/curl.git
synced 2026-05-16 21:06:19 +03:00
event: fix wakeup consumption
The events on a multi wakeup socketpair were only consumed via curl_multi_poll()/curl_multi_wait() but not in event based processing on a curl_multi_socket() call. That led to busy loops as reported in Fixes #21547 Reported-by: Earnestly on github Closes #21549
This commit is contained in:
parent
01f08dc4eb
commit
2a2104f3cf
1 changed files with 5 additions and 0 deletions
|
|
@ -2703,6 +2703,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||
Curl_uint32_bset_remove(&multi->dirty, data->mid);
|
||||
|
||||
if(data == multi->admin) {
|
||||
#ifdef ENABLE_WAKEUP
|
||||
/* Consume any pending wakeup signals before processing.
|
||||
* This is necessary for event based processing. See #21547 */
|
||||
(void)Curl_wakeup_consume(multi->wakeup_pair, TRUE);
|
||||
#endif
|
||||
#ifdef USE_RESOLV_THREADED
|
||||
Curl_async_thrdd_multi_process(multi);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue