]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Catch FDMultiplexerException in IOStateHandler's destructor 10656/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 20 Aug 2021 09:42:17 +0000 (11:42 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 20 Aug 2021 09:42:17 +0000 (11:42 +0200)
pdns/dnsdistdist/tcpiohandler-mplexer.hh

index c7d0c26e09f3ca64c4aef6c492e983f108d4e27d..a241967326bd34f3d25359e1023af907c75377c0 100644 (file)
@@ -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