Skip to content
Snippets Groups Projects
Commit f2273486 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

Merge 'handlers: rebootstrap zone if load fails'

parents d80ce775 0b008fc1
No related branches found
No related tags found
No related merge requests found
......@@ -321,10 +321,10 @@ int event_load(zone_t *zone)
free(filename);
uint32_t dnssec_refresh = time(NULL);
zone_contents_t *contents;
zone_contents_t *contents = NULL;
int ret = zone_load_contents(conf(), zone->name, &contents);
if (ret != KNOT_EOK) {
return ret;
goto fail;
}
/* Store zonefile serial and apply changes from the journal. */
......@@ -394,6 +394,12 @@ int event_load(zone_t *zone)
fail:
zone_contents_deep_free(&contents);
/* Try to bootstrap the zone if local error. */
if (zone_is_slave(zone) && !zone_events_is_scheduled(zone, ZONE_EVENT_XFER)) {
zone_events_schedule(zone, ZONE_EVENT_XFER, ZONE_EVENT_NOW);
}
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment