From a34ba8a84c36cb4089669d10193d825158d139fe Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 14 Feb 2018 10:46:03 -0800 Subject: [PATCH] Continue to next iteration on FLOOD_WAIT error --- .../kotlin/de/fabianonline/telegram_backup/DownloadManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/DownloadManager.kt b/src/main/kotlin/de/fabianonline/telegram_backup/DownloadManager.kt index c338145..aae5757 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/DownloadManager.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/DownloadManager.kt @@ -431,6 +431,7 @@ class DownloadManager(internal var client: TelegramClient?, p: DownloadProgressI if (e.getCode() == 420) { // FLOOD_WAIT try_again = true Utils.obeyFloodWaitException(e) + continue // response is null since we didn't actually receive any data. Skip the rest of this iteration and try again. } else if (e.getCode() == 400) { //Somehow this file is broken. No idea why. Let's skip it for now return false