Fix wrong assertion mAddedEasyRequests.size() >= (size_t)mRunningHandles
Rename check_run_count to check_msg_queue, because the whole 'run count' approach is flawed anyway (the author of libcurl told me that THE way to check for finished curl handles is to just call curl_multi_info_read every time: it's extremely fast. Any test that attempts to avoid that call is nonsense anyway. The reason the assertion failed might have been caused by the fact that we're comparing the current number of easy handles with the number of running handles of 'a while ago'. It is possible that a easy handle was removed in the meantime. In order to check if that hypothesis is right, I moved the assertion to directly below the call to curl_multi_socket_action where it should hold. If this new assertion doesn't trigger than the hypothesis was right and this is fixed.
This commit is contained in:
@@ -357,7 +357,7 @@ class CurlEasyRequest : public CurlEasyHandle {
|
||||
// Called by in case of an error.
|
||||
void print_diagnostics(CURLcode code);
|
||||
|
||||
// Called by MultiHandle::check_run_count() to fill info with the transfer info.
|
||||
// Called by MultiHandle::check_msg_queue() to fill info with the transfer info.
|
||||
void getTransferInfo(AITransferInfo* info);
|
||||
|
||||
// If result != CURLE_FAILED_INIT then also info was filled.
|
||||
|
||||
Reference in New Issue
Block a user