From: Kees Monshouwer Date: Wed, 22 Dec 2021 12:18:57 +0000 (+0100) Subject: auth: improve tcp exception handling X-Git-Tag: auth-4.7.0-alpha1~95^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11122%2Fhead;p=thirdparty%2Fpdns.git auth: improve tcp exception handling --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 9670c9a8bc..fb176452f6 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -415,11 +415,13 @@ void TCPNameserver::doConnection(int fd) } catch(std::exception &e) { - g_log<reset(); // on next call, backend will be recycled + g_log << Logger::Error << "TCP Connection Thread died because of STL error, cycling backend: " << e.what() << endl; } catch( ... ) { - g_log << Logger::Error << "TCP Connection Thread caught unknown exception." << endl; + s_P.lock()->reset(); // on next call, backend will be recycled + g_log << Logger::Error << "TCP Connection Thread caught unknown exception, cycling backend." << endl; } d_connectionroom_sem->post();