Issue 422: Fixed start_polling with clean=True can cause 'Too Many Requests' error from Telegram. (#437)

This commit is contained in:
neutronnnate 2016-10-25 11:30:05 -06:00 committed by Jannes Höke
parent 10bdf8212c
commit 761547e71d

View file

@ -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):