Skip to content

Commit

Permalink
avoid race condition, also avoid a rare crash. Patch from ticket Powe…
Browse files Browse the repository at this point in the history
…rDNS#596

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2802 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information
peter committed Oct 11, 2012
1 parent 05eabcb commit 2a52895
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pdns/slavecommunicator.cc
Expand Up @@ -577,8 +577,12 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P)
typedef DomainNotificationInfo val_t;
BOOST_FOREACH(val_t& val, sdomains) {
DomainInfo& di(val.di);
if(!di.backend) // might've come from the packethandler
B->getDomainInfo(di.zone, di);
// might've come from the packethandler
if(!di.backend && !B->getDomainInfo(di.zone, di)) {
L<<Logger::Warning<<"Ignore domain "<< di.zone<<" since it has been removed from our backend"<<endl;
continue;
}

if(!ssr.d_freshness.count(di.id))
continue;
uint32_t theirserial = ssr.d_freshness[di.id].theirSerial, ourserial = di.serial;
Expand Down

0 comments on commit 2a52895

Please sign in to comment.