Skip to content
Snippets Groups Projects
Commit 59e91584 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

events: plan refresh/expire only for slave zones

parent 18213583
No related branches found
No related tags found
No related merge requests found
......@@ -81,9 +81,11 @@ static int event_reload(zone_t *zone)
/* Schedule notify and refresh after load. */
const knot_rdataset_t *soa = zone_contents_soa(contents);
assert(soa); /* We just checked the contents, it MUST be consistent. */
zone_events_schedule(zone, ZONE_EVENT_REFRESH, knot_soa_refresh(soa));
zone_events_schedule(zone, ZONE_EVENT_EXPIRE, knot_soa_expire(soa));
zone_events_schedule(zone, ZONE_EVENT_NOTIFY, ZONE_EVENT_NOW);
if (zone_master(zone)) {
zone_events_schedule(zone, ZONE_EVENT_REFRESH, ZONE_EVENT_NOW);
zone_events_schedule(zone, ZONE_EVENT_EXPIRE, knot_soa_expire(soa));
}
zone_events_schedule(zone, ZONE_EVENT_NOTIFY, ZONE_EVENT_NOW + 10);
zone_events_schedule(zone, ZONE_EVENT_FLUSH, zone_config->dbsync_timeout);
log_zone_info("Zone '%s' loaded.\n", zone_config->name);
......
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