diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/fetch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/content/fetch.c b/content/fetch.c index a468a05a9..c072a1e5a 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -418,7 +418,14 @@ void fetch_abort(struct fetch *f) { assert(f); LOG(("fetch %p, url '%s'", f, f->url)); - f->abort = true; + if (f->queue_prev) { + f->queue_prev->queue_next = f->queue_next; + if (f->queue_next) + f->queue_next->queue_prev = f->queue_prev; + fetch_free(f); + } else { + f->abort = true; + } } @@ -579,7 +586,7 @@ void fetch_done(CURL *curl_handle, CURLcode result) callback = f->callback; p = f->p; - if (result == CURLE_OK) { + if (!abort && result == CURLE_OK) { /* fetch completed normally */ if (!f->had_headers && fetch_process_headers(f)) ; /* redirect with no body or similar */ |