As spotted by Coverity, one function called from a destructor could
in theory throw an exception which is not caught from within the
destructor, which would lead to a termination of the program.
At a quick glance it seems quite impossible to happen in practice
with the current code, but let's fix it nevertheless.
IncomingTCPConnectionState::~IncomingTCPConnectionState()
{
- dnsdist::IncomingConcurrentTCPConnectionsManager::accountClosedTCPConnection(d_ci.remote);
+ try {
+ dnsdist::IncomingConcurrentTCPConnectionsManager::accountClosedTCPConnection(d_ci.remote);
+ }
+ catch (...) {
+ /* in theory it might raise an exception, and we cannot allow it to be uncaught in a dtor */
+ }
if (d_ci.cs != nullptr) {
timeval now{};