while(time(0) < next) {
rc=d_any_sem.tryWait();
- if(rc)
+ if(rc) {
+ bool extraSlaveRefresh = false;
Utility::sleep(1);
+ {
+ Lock l(&d_lock);
+ if (d_tocheck.size())
+ extraSlaveRefresh = true;
+ }
+ if (extraSlaveRefresh)
+ slaveRefresh(&P);
+ }
else {
break; // something happened
}
set<DNSPacket, cmp> trysuperdomains;
{
Lock l(&d_lock);
- rdomains.insert(rdomains.end(), d_tocheck.begin(), d_tocheck.end());
- d_tocheck.clear();
+ set<DomainInfo> requeue;
+ for(const auto& di: d_tocheck) {
+ if(d_inprogress.count(di.zone)) {
+ g_log<<Logger::Debug<<"Got NOTIFY for "<<di.zone<<" while AXFR in progress, requeueing SOA check"<<endl;
+ requeue.insert(di);
+ }
+ else {
+ g_log<<Logger::Debug<<"Got NOTIFY for "<<di.zone<<", going to check SOA serial"<<endl;
+ rdomains.push_back(di);
+ }
+ }
+ d_tocheck.swap(requeue);
trysuperdomains = d_potentialsupermasters;
d_potentialsupermasters.clear();