Continue to next iteration on FLOOD_WAIT error

This commit is contained in:
Leijurv 2018-02-14 10:46:03 -08:00 committed by GitHub
parent 3911af1f88
commit a34ba8a84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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