This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH setup 2/5] Fix off-by-one error in download retry report


'retries' was decremented after it was tested but before it was
reported in the log, so the reported number was always 1 too low.
---
 download.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/download.cc b/download.cc
index f6aa6fc..a430f7f 100644
--- a/download.cc
+++ b/download.cc
@@ -245,8 +245,8 @@ do_download_thread (HINSTANCE h, HWND owner)
   if (errors)
     {
       // In unattended mode we retry the download, but not forever.
-      static int retries = 4;
-      if (unattended_mode && retries-- <= 0)
+      static int retries = 5;
+      if (unattended_mode && --retries <= 0)
         {
 	  Log (LOG_PLAIN) << "download error in unattended_mode: out of retries" << endLog;
 	  Logger ().setExitMsg (IDS_INSTALL_INCOMPLETE);
-- 
2.15.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]