fix(core): properly handle WORKER_BUSY_TOO_LONG_RETRY error
This commit is contained in:
parent
3ca8f847e6
commit
77ab185493
1 changed files with 4 additions and 0 deletions
|
@ -505,6 +505,10 @@ export class BaseTelegramClient {
|
||||||
|
|
||||||
if (e instanceof InternalError) {
|
if (e instanceof InternalError) {
|
||||||
debug('Telegram is having internal issues: %s', e)
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue