mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-23 01:06:17 +00:00
Replace FLOOD_WAIT check with the version used in download messages
This commit is contained in:
parent
004b650762
commit
3911af1f88
@ -316,7 +316,7 @@ class DownloadManager(internal var client: TelegramClient?, p: DownloadProgressI
|
|||||||
try {
|
try {
|
||||||
_downloadMedia()
|
_downloadMedia()
|
||||||
} catch (e: RpcErrorException) {
|
} catch (e: RpcErrorException) {
|
||||||
if (e.getTag().startsWith("420: FLOOD_WAIT_")) {
|
if (e.getCode() == 420) { // FLOOD_WAIT
|
||||||
completed = false
|
completed = false
|
||||||
Utils.obeyFloodWaitException(e)
|
Utils.obeyFloodWaitException(e)
|
||||||
} else {
|
} else {
|
||||||
@ -428,7 +428,7 @@ class DownloadManager(internal var client: TelegramClient?, p: DownloadProgressI
|
|||||||
try {
|
try {
|
||||||
response = download_client!!.executeRpcQuery(req, dcID) as TLFile
|
response = download_client!!.executeRpcQuery(req, dcID) as TLFile
|
||||||
} catch (e: RpcErrorException) {
|
} catch (e: RpcErrorException) {
|
||||||
if (e.getTag().startsWith("420: FLOOD_WAIT_")) {
|
if (e.getCode() == 420) { // FLOOD_WAIT
|
||||||
try_again = true
|
try_again = true
|
||||||
Utils.obeyFloodWaitException(e)
|
Utils.obeyFloodWaitException(e)
|
||||||
} else if (e.getCode() == 400) {
|
} else if (e.getCode() == 400) {
|
||||||
|
Loading…
Reference in New Issue
Block a user