Pārlūkot izejas kodu

Merge pull request #7972 from RussWhitehead/soapRetry

HPCC-14555 SoapCall retries(0) still does one retry

Reviewed-By: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 gadi atpakaļ
vecāks
revīzija
4b9e560e41
1 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 6 6
      common/thorhelper/thorsoapcall.cpp

+ 6 - 6
common/thorhelper/thorsoapcall.cpp

@@ -1754,7 +1754,7 @@ public:
     {
         StringBuffer request;
         StringBuffer response;
-        unsigned attempts = 0;
+        unsigned numRetries = 0;
         unsigned retryInterval = 0;
 
         Url &url = master->urlArray.item(idx);
@@ -1917,17 +1917,17 @@ public:
 
                 // other IException ... retry up to maxRetries
                 StringBuffer s;
-                master->logctx.CTXLOG("Exception %s - retrying? (%d<%d)", e->errorMessage(s).str(), attempts, master->maxRetries);
+                master->logctx.CTXLOG("Exception %s", e->errorMessage(s).str());
 
-                if (attempts > master->maxRetries)
+                if (numRetries >= master->maxRetries)
                 {
                     // error affects all inputRows
-                    master->logctx.CTXLOG("Exiting: maxRetries exceeded");
+                    master->logctx.CTXLOG("Exiting: maxRetries %d exceeded", master->maxRetries);
                     processException(url, inputRows, e);
                     break;
                 }
-                master->logctx.CTXLOG("Retrying: maxRetries not exceeded");
-                attempts++;
+                numRetries++;
+                master->logctx.CTXLOG("Retrying: attempt %d of %d", numRetries, master->maxRetries);
                 e->Release();
             }
             catch (std::exception & es)