From 26d75dc222a70a9e0e0466f8acfdde1aa15bc523 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 6 Mar 2017 16:10:42 +0100 Subject: [PATCH] with this change, a crash because of a PDNSException in qthread gets turned into an error message and an exit. Closes #3830. --- pdns/common_startup.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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<