1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-11 16:34:04 +02:00

Retry sleep time in Http and in DownloadFileThread too

This commit is contained in:
Zsombor Gegesy
2022-04-13 09:01:04 +02:00
committed by soloturn
parent ed0e214993
commit e6ccfc0a34

View File

@@ -299,6 +299,15 @@ class DownloadFileThread extends Thread {
observer.downloadErrored(url,
Utils.getLocalizedString("failed.to.download") + " " + url.toExternalForm());
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);
observer.downloadCompleted(url, saveAs.toPath());