Before, if the `refresh` was not set in the lua-config file's
`rpzMaster` statement, we would keep trying to get delta's the whole
time. This commit ensures we update the zone's refresh config to the
value from the AXFR'd zone (if not set in the config).
while (!sr) {
try {
sr=loadRPZFromServer(master, zoneName, zone, defpol, maxTTL, tt, maxReceivedBytes, localAddress);
- if(refresh) {
- sr->d_st.refresh=refresh;
+ if(refresh == 0) {
+ refresh = sr->d_st.refresh;
}
zone->setSerial(sr->d_st.serial);
}
}
if (!sr) {
- sleep(refresh);
+ if (refresh == 0) {
+ sleep(10);
+ } else {
+ sleep(refresh);
+ }
}
}