]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix issue if signer could not sign and died on us, leaving us with 100% busy CPU...
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Fri, 6 Jul 2012 12:02:44 +0000 (12:02 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Fri, 6 Jul 2012 12:02:44 +0000 (12:02 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2670 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/signingpipe.cc

index 68888002c97d38000151e827278516d3c5f13daa..384ac3bfb356991f4221b5f9aa181548ec2a5bb8 100644 (file)
@@ -63,7 +63,7 @@ try
   return 0;
 }
 catch(std::exception& e) {
-  cerr<<"Signing thread died with error "<<e.what()<<endl;
+  L<<Logger::Error<<"Signing thread died with error "<<e.what()<<endl;
   return 0;
 }
 
@@ -123,7 +123,7 @@ pair<vector<int>, vector<int> > ChunkedSigningPipe::waitForRW(bool rd, bool wr,
   vector<pollfd> pfds;
   
   for(unsigned int n = 0; n < d_sockets.size(); ++n) {    
-    if(d_eof.count(n))  
+    if(d_eof.count(d_sockets[n]))  
       continue;
     struct pollfd pfd;
     memset(&pfd, 0, sizeof(pfd));
@@ -274,7 +274,7 @@ try
 }
 catch(std::exception& e)
 {
-  cerr<<"Signing thread died because of std::exception: "<<e.what()<<endl;
+  L<<Logger::Error<<"Signing thread died because of std::exception: "<<e.what()<<endl;
   close(fd);
 }