From: Remi Gacogne Date: Fri, 20 Aug 2021 09:42:17 +0000 (+0200) Subject: dnsdist: Catch FDMultiplexerException in IOStateHandler's destructor X-Git-Tag: dnsdist-1.7.0-alpha1~47^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10656%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Catch FDMultiplexerException in IOStateHandler's destructor --- diff --git a/pdns/dnsdistdist/tcpiohandler-mplexer.hh b/pdns/dnsdistdist/tcpiohandler-mplexer.hh index c7d0c26e09..a241967326 100644 --- a/pdns/dnsdistdist/tcpiohandler-mplexer.hh +++ b/pdns/dnsdistdist/tcpiohandler-mplexer.hh @@ -27,7 +27,13 @@ public: /* be careful that this won't save us if the callback is still registered to the multiplexer, because in that case the shared pointer count will never reach zero so this destructor won't be called */ - reset(); + try { + reset(); + } + catch (const FDMultiplexerException& e) { + /* that should not happen, but an exception raised from a destructor would be bad so better + safe than sorry */ + } } IOState getState() const