]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add a couple comments in the health-check timeout handling code 13009/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 11 Jul 2023 08:15:51 +0000 (10:15 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 11 Jul 2023 08:15:51 +0000 (10:15 +0200)
pdns/dnsdistdist/dnsdist-healthchecks.cc

index cc73a9d7547872423be0b811ce527be642e547a2..4df42302f3bc19c0fa79abde65c2d72df076abe5 100644 (file)
@@ -459,11 +459,15 @@ void handleQueuedHealthChecks(FDMultiplexer& mplexer, bool initial)
         data->d_ds->submitHealthCheckResult(initial, false);
       }
       catch (const std::exception& e) {
+        /* this is not supposed to happen as the file descriptor has to be
+           there for us to reach that code, and the submission code should not throw,
+           but let's provide a nice error message if it ever does. */
         if (g_verboseHealthChecks) {
           infolog("Error while dealing with a timeout for the health check response (ID %d) from backend %s: %s", data->d_queryID, data->d_ds->getNameWithAddr(), e.what());
         }
       }
       catch (...) {
+        /* this is even less likely to happen */
         if (g_verboseHealthChecks) {
           infolog("Error while dealing with a timeout for the health check response (ID %d) from backend %s", data->d_queryID, data->d_ds->getNameWithAddr());
         }
@@ -487,11 +491,14 @@ void handleQueuedHealthChecks(FDMultiplexer& mplexer, bool initial)
         data->d_ds->submitHealthCheckResult(initial, false);
       }
       catch (const std::exception& e) {
+        /* this is not supposed to happen as the submission code should not throw,
+           but let's provide a nice error message if it ever does. */
         if (g_verboseHealthChecks) {
           infolog("Error while dealing with a timeout for the health check response (ID %d) from backend %s: %s", data->d_queryID, data->d_ds->getNameWithAddr(), e.what());
         }
       }
       catch (...) {
+        /* this is even less likely to happen */
         if (g_verboseHealthChecks) {
           infolog("Error while dealing with a timeout for the health check response (ID %d) from backend %s", data->d_queryID, data->d_ds->getNameWithAddr());
         }