fetch: When aborting, ensure we note this to not multi-fail
When aborting a fetch, it may be cleaned up, in which case we would otherwise send a spurious failure message too early. Instead we record that the abort has occurred to suppress such an error. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
5cfe0dfffc
commit
97870122dd
|
@ -585,6 +585,7 @@ fetch_start(nsurl *url,
|
|||
void fetch_abort(struct fetch *f)
|
||||
{
|
||||
assert(f);
|
||||
f->last_msg = FETCH__INTERNAL_ABORTED;
|
||||
NSLOG(fetch, DEBUG,
|
||||
"fetch %p, fetcher %p, url '%s'", f, f->fetcher_handle,
|
||||
nsurl_access(f->url));
|
||||
|
|
|
@ -60,6 +60,12 @@ typedef enum {
|
|||
*/
|
||||
#define FETCH_MIN_FINISHED_MSG FETCH_FINISHED
|
||||
|
||||
/**
|
||||
* This message is actually an internal message used to indicate
|
||||
* that a fetch was aborted. Do not send this, nor expect it.
|
||||
*/
|
||||
#define FETCH__INTERNAL_ABORTED FETCH_ERROR
|
||||
|
||||
/**
|
||||
* Fetcher message data
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue