diff options
Diffstat (limited to 'content/fetch.c')
-rw-r--r-- | content/fetch.c | 7 |
1 files 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 */ |