mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-31 16:40:53 +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
|
||||
self.bot.setWebhook(webhook_url='')
|
||||
self._clean_updates()
|
||||
sleep(1)
|
||||
|
||||
self.bot.setWebhook(webhook_url=webhook_url, certificate=cert)
|
||||
except (Unauthorized, InvalidToken):
|
||||
|
|
Loading…
Reference in a new issue