From d6c226c5d71209bae7d84a4803a8b6bdae0bced7 Mon Sep 17 00:00:00 2001 From: Sude Date: Wed, 8 Apr 2020 09:22:58 +0300 Subject: [PATCH] Wait between retries if --wait option is used --- src/downloader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/downloader.cpp b/src/downloader.cpp index 35e4284..dae2b02 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2782,6 +2782,9 @@ void Downloader::processDownloadQueue(Config conf, const unsigned int& tid) bool bShouldRetry = false; do { + if (conf.iWait > 0) + usleep(conf.iWait); // Wait before continuing + response_code = 0; // Make sure that response code is reset if (iRetryCount != 0)