Skip to content
Snippets Groups Projects
Commit 1de98157 authored by Libor Peltan's avatar Libor Peltan
Browse files

NOTIFY delayed 1s after DDNS or XFR.

This does not big harm on not-frequently updated zones, NOTIFY is simply delayed.
This helps on frequently updated (DDNS or [AI]XFR) zones - NOTIFY is not sent more often than once a second.
parent 345da3b8
No related branches found
No related tags found
No related merge requests found
......@@ -918,7 +918,7 @@ int event_refresh(conf_t *conf, zone_t *zone)
/* Rechedule events. */
replan_from_timers(conf, zone);
if (updated) {
zone_events_schedule_now(zone, ZONE_EVENT_NOTIFY);
zone_events_schedule_at(zone, ZONE_EVENT_NOTIFY, time(NULL) + 1);
conf_val_t val = conf_zone_get(conf, C_ZONEFILE_SYNC, zone->name);
int64_t sync_timeout = conf_int(&val);
......
......@@ -200,7 +200,7 @@ static void process_requests(conf_t *conf, zone_t *zone, list_t *requests)
"%.02f seconds", old_serial, new_serial,
time_diff_ms(&t_start, &t_end));
zone_events_schedule_now(zone, ZONE_EVENT_NOTIFY);
zone_events_schedule_at(zone, ZONE_EVENT_NOTIFY, time(NULL) + 1);
}
static int remote_forward(conf_t *conf, struct knot_request *request, conf_remote_t *remote)
......
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