mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 10:46:23 +00:00
Fix fetch process for manifests with the same payload, make sure failures don't get stuck in a loop
This commit is contained in:
parent
25e99787df
commit
c79c5d8968
@ -633,8 +633,8 @@ rhizome_fetch(struct rhizome_fetch_slot *slot, rhizome_manifest *m, const struct
|
|||||||
if (gotfile) {
|
if (gotfile) {
|
||||||
if (debug & DEBUG_RHIZOME_RX)
|
if (debug & DEBUG_RHIZOME_RX)
|
||||||
DEBUGF(" fetch not started - payload already present, so importing instead");
|
DEBUGF(" fetch not started - payload already present, so importing instead");
|
||||||
if (rhizome_bundle_import(m, m->ttl-1) == -1)
|
if (rhizome_add_manifest(m, m->ttl-1) == -1)
|
||||||
return WHY("bundle import failed");
|
return WHY("add manifest failed");
|
||||||
return IMPORTED;
|
return IMPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -723,6 +723,7 @@ static void rhizome_start_next_queued_fetch(struct rhizome_fetch_slot *slot)
|
|||||||
case SAMEPAYLOAD:
|
case SAMEPAYLOAD:
|
||||||
case SUPERSEDED:
|
case SUPERSEDED:
|
||||||
case NEWERBUNDLE:
|
case NEWERBUNDLE:
|
||||||
|
default:
|
||||||
// Discard the candidate fetch and loop to try the next in queue.
|
// Discard the candidate fetch and loop to try the next in queue.
|
||||||
rhizome_fetch_unqueue(q, i);
|
rhizome_fetch_unqueue(q, i);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user