-
-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Description
IIUC the documentation every messages are returned only once and then removed from the internal handle.
But curl_multi::is_finished consumes all the queue searching for a specific easy handle, discarding the messages it is not interested in.
auto m = curl::curl_multi{};
m.add(easy1);
m.add(easy2);
// do something
std::cout << m.is_finished(easy1) << std::endl;
std::cout << m.is_finished(easy2) << std::endl;The first call to curl_multi::is_finished could discard a message for easy2.
What if we add an unordered_map[easy_handle->message] in the curl_multi class in order to store the messages returned by curl_multi_info_read (overwrite the old ones should be ok)?
According to this answer on stackoverflow in order to reuse an easy handle you have to remove it, change and then re-add to the multi instance; if so we can cleanup the messages map during the remove phase.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels