fix(core): properly handle WORKER_BUSY_TOO_LONG_RETRY error

This commit is contained in:
teidesu 2021-04-24 20:13:36 +03:00
parent 3ca8f847e6
commit 77ab185493

View file

@ -505,6 +505,10 @@ export class BaseTelegramClient {
if (e instanceof InternalError) {
debug('Telegram is having internal issues: %s', e)
if (e.message === 'WORKER_BUSY_TOO_LONG_RETRY') {
// according to tdlib, "it is dangerous to resend query without timeout, so use 1"
await sleep(1000)
}
continue
}