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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5117%2Fhead;p=thirdparty%2Fpdns.git 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 1fa7275715..41197b3375 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<