mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-29 01:37:28 +01:00
Issue 422: Fixed start_polling with clean=True can cause 'Too Many Requests' error from Telegram. (#437)
This commit is contained in:
parent
10bdf8212c
commit
761547e71d
1 changed files with 1 additions and 0 deletions
|
@ -330,6 +330,7 @@ class Updater(object):
|
||||||
# Disable webhook for cleaning
|
# Disable webhook for cleaning
|
||||||
self.bot.setWebhook(webhook_url='')
|
self.bot.setWebhook(webhook_url='')
|
||||||
self._clean_updates()
|
self._clean_updates()
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
self.bot.setWebhook(webhook_url=webhook_url, certificate=cert)
|
self.bot.setWebhook(webhook_url=webhook_url, certificate=cert)
|
||||||
except (Unauthorized, InvalidToken):
|
except (Unauthorized, InvalidToken):
|
||||||
|
|
Loading…
Add table
Reference in a new issue