This is the mail archive of the
mailing list for the Cygwin project.
[PATCH setup 2/5] Fix off-by-one error in download retry report
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 10 Nov 2017 09:43:36 -0500
- Subject: [PATCH setup 2/5] Fix off-by-one error in download retry report
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
'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
@@ -245,8 +245,8 @@ do_download_thread (HINSTANCE h, HWND owner)
// 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);