From 6dc14a06b7df3633307e2cbaec49ef785406026d Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 17 Sep 2003 17:44:12 +0000 Subject: [project @ 2003-09-17 17:44:12 by bursa] Fix aborting fetches. svn path=/import/netsurf/; revision=299 --- content/fetch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/fetch.c b/content/fetch.c index 300b68023..3f87454e1 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -168,6 +168,7 @@ struct fetch * fetch_start(char *url, char *referer, if (host_fetch != 0) { /* fetch from this host in progress: queue the new fetch */ LOG(("queueing")); + fetch->curl_handle = 0; fetch->queue = host_fetch->queue; host_fetch->queue = fetch; return fetch; @@ -269,8 +270,10 @@ void fetch_abort(struct fetch *f) f->next->prev = f->prev; /* remove from curl multi handle */ - codem = curl_multi_remove_handle(curl_multi, f->curl_handle); - assert(codem == CURLM_OK); + if (f->cull_handle) { + codem = curl_multi_remove_handle(curl_multi, f->curl_handle); + assert(codem == CURLM_OK); + } if (f->queue != 0) { /* start a queued fetch for this host, reusing the handle for this host */ -- cgit v1.2.3