mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-12 08:54:11 +02:00
Retry sleep time in Http and in DownloadFileThread too
This commit is contained in:
@@ -299,6 +299,15 @@ class DownloadFileThread extends Thread {
|
|||||||
observer.downloadErrored(url,
|
observer.downloadErrored(url,
|
||||||
Utils.getLocalizedString("failed.to.download") + " " + url.toExternalForm());
|
Utils.getLocalizedString("failed.to.download") + " " + url.toExternalForm());
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
final var retrySleep = Utils.getConfigInteger("download.retry.sleep", 0);
|
||||||
|
if (retrySleep > 0) {
|
||||||
|
try {
|
||||||
|
sleep(retrySleep);
|
||||||
|
} catch (final InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (true);
|
} while (true);
|
||||||
observer.downloadCompleted(url, saveAs.toPath());
|
observer.downloadCompleted(url, saveAs.toPath());
|
||||||
|
Reference in New Issue
Block a user