From: bert hubert Date: Mon, 6 Mar 2017 15:10:42 +0000 (+0100) Subject: with this change, a crash because of a PDNSException in qthread gets turned into... X-Git-Tag: rec-4.1.0-alpha1~227^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26d75dc222a70a9e0e0466f8acfdde1aa15bc523;p=pdns with this change, a crash because of a PDNSException in qthread gets turned into an error message and an exit. Closes #3830. --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 1fa727571..41197b337 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -343,6 +343,7 @@ void sendout(DNSPacket* a) //! The qthread receives questions over the internet via the Nameserver class, and hands them to the Distributor for further processing void *qthread(void *number) +try { DNSPacket *P; DNSDistributor *distributor = DNSDistributor::Create(::arg().asNum("distributor-threads", 1)); // the big dispatcher! @@ -456,6 +457,11 @@ void *qthread(void *number) } return 0; } +catch(PDNSException& pe) +{ + L<