From 314124d3ef41298eeb3004752f4021a9b1c08f74 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 12 Mar 2011 23:59:37 +0000 Subject: 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 --- content/fetchers/curl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'content/fetchers') diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c index 56119bef1..895dc4256 100644 --- a/content/fetchers/curl.c +++ b/content/fetchers/curl.c @@ -711,8 +711,6 @@ void fetch_curl_poll(const char *scheme_ignored) CURLMcode codem; CURLMsg *curl_msg; - schedule_remove((schedule_callback_fn)fetch_curl_poll, NULL); - /* do any possible work on the current fetches */ do { 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); } + + if (running != 0) { + schedule(10, (schedule_callback_fn)fetch_curl_poll, fetch_curl_poll); + } } -- cgit v1.2.3