Instead of deleting the early scheduled poll, simply always add another poll if cURL thinks there might be work to do later

svn path=/trunk/netsurf/; revision=12003
This commit is contained in:
Daniel Silverstone 2011-03-12 23:59:37 +00:00
parent 7d8e3cac49
commit 314124d3ef

View File

@ -711,8 +711,6 @@ void fetch_curl_poll(const char *scheme_ignored)
CURLMcode codem; CURLMcode codem;
CURLMsg *curl_msg; CURLMsg *curl_msg;
schedule_remove((schedule_callback_fn)fetch_curl_poll, NULL);
/* do any possible work on the current fetches */ /* do any possible work on the current fetches */
do { do {
codem = curl_multi_perform(fetch_curl_multi, &running); codem = curl_multi_perform(fetch_curl_multi, &running);
@ -737,6 +735,10 @@ void fetch_curl_poll(const char *scheme_ignored)
} }
curl_msg = curl_multi_info_read(fetch_curl_multi, &queue); curl_msg = curl_multi_info_read(fetch_curl_multi, &queue);
} }
if (running != 0) {
schedule(10, (schedule_callback_fn)fetch_curl_poll, fetch_curl_poll);
}
} }