[PATCH setup 2/5] Fix off-by-one error in download retry report
Ken Brown
kbrown@cornell.edu
Fri Nov 10 14:43:00 GMT 2017
'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
More information about the Cygwin-apps
mailing list