Browse Source

Merge pull request #8514 from mckellyln/hpcc-15395

HPCC-15395 Thormaster crash when running job and asked to stop

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 years ago
parent
commit
d0c6846f5b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      thorlcr/master/thgraphmanager.cpp

+ 7 - 0
thorlcr/master/thgraphmanager.cpp

@@ -966,7 +966,14 @@ void abortThor(IException *e, unsigned errCode, bool abortCurrentJob)
         aborting = 2;
         LOG(MCdebugProgress, thorJob, "aborting any current active job");
         if (jM)
+        {
+            if (!e)
+            {
+                _e.setown(MakeThorException(TE_AbortException, "THOR ABORT"));
+                e = _e;
+            }
             jM->fireException(e);
+        }
         if (errCode == TEC_Clean)
         {
             LOG(MCdebugProgress, thorJob, "Removing sentinel upon normal shutdown");