소스 검색

Minor changes following review

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith 12 년 전
부모
커밋
fc032d72e6
1개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 10 5
      common/thorhelper/thorsoapcall.cpp

+ 10 - 5
common/thorhelper/thorsoapcall.cpp

@@ -910,8 +910,9 @@ public:
                 return row;
             // should only be here if setDone() triggered
             complete = true;
-            if (error.get())
-                throw error.getLink();
+            Owned<IException> e = getError();
+            if (e)
+                throw e.getClear();
             break;
         }
         return NULL;
@@ -975,9 +976,13 @@ protected:
     }
     void setDone()
     {
-        SpinBlock sb(outputQLock);
-        done++;
-        if (done == numRowThreads)
+        bool doStop;
+        {
+            SpinBlock sb(outputQLock);
+            done++;
+            doStop = (done == numRowThreads);
+        }
+        if (doStop)
             outputQ.stop();
     }
     void setErrorOwn(IException * e)