Procházet zdrojové kódy

HPCC-9633 - Watchdog crash if collects after shutdown

If the watchdog happens to be about to collect progress/stats
when thor is shutting down, it could crash. Check if stopping
after sleep and quit before collecting

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith před 12 roky
rodič
revize
ee3d424c9e
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      thorlcr/slave/slwatchdog.cpp

+ 2 - 0
thorlcr/slave/slwatchdog.cpp

@@ -142,6 +142,8 @@ public:
         while (!stopped)
         {
             Sleep(1000);
+            if (stopped)
+                break;
             if (count--==0)
             {
                 gatherAndSend();