curl-library
Multi interface -- some trouble
Date: Tue, 17 Feb 2004 03:21:16 -0500
I'm using the win32 mingw dll (7.11) downloaded from the curl site
with the Euphoria language (my own wrapper, not the one listed on the
site).
I've been trying out the multi interface and having some crashes.
If I create several easy handles and then call curl_multi_perform()
in a loop until all the transfers are done (I don't think I can use
the fdset() function with Euphoria cause there is no select() or
poll() and it uses its own file descriptors) then it works fine.
But imagine I've got dozens of pages to process, but I only want 5 or
so in the multi-handle at any one time. I thought maybe as the
transfers completed and some easy handles were being removed [ using
curl_multi_remove_handle() ] from the multi handle, then I could then
go ahead and add other easy handles at that point. However, when I
do that, I get a crash shortly thereafter -- not when adding the
handle, but during the call to curl_multi_perform().
So then I tried just waiting until all the transfers were finished
(removing and cleaning up all the easy handles, and then cleaning up
the multi_handle), and then starting up a new multi handle. I also
got crashes doing that! In other words, the first multi handle and
all associated easy handles had been cleaned up; but then when I
created a new multi handle and began processing new easy handles, it
again crashed during curl_multi_perform().
These errors happen often, but are not precisely repeatable --
sometimes it crashes, sometimes not, or at a different time.
So it seems once you've the multi interface once, that's it for the
life of your application...
Any ideas?
Received on 2004-02-17