Parcourir la source

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 il y a 12 ans
Parent
commit
ee3d424c9e
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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();