diff --git a/src/main/java/de/fabianonline/telegram_backup/Config.java b/src/main/java/de/fabianonline/telegram_backup/Config.java index cb6e76e..4fce9a6 100644 --- a/src/main/java/de/fabianonline/telegram_backup/Config.java +++ b/src/main/java/de/fabianonline/telegram_backup/Config.java @@ -19,6 +19,7 @@ class Config { public static final int FILE_DOWNLOAD_BLOCK_SIZE = 10*1024*1024; + public static final int DELAY_AFTER_GET_MESSAGES = 200; public static final int DELAY_AFTER_GET_FILE = 200; } diff --git a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java index d3c33a0..e52be62 100644 --- a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java +++ b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java @@ -77,7 +77,7 @@ class DownloadManager { prog.onMessageDownloaded(response.getMessages().size()); db.save(response.getMessages()); try { - Thread.sleep(750); + Thread.sleep(Config.DELAY_AFTER_GET_MESSAGES); } catch (InterruptedException e) {} }