X Tutup
Skip to content

Commit 761547e

Browse files
neutronnnatejh0ker
authored andcommitted
Issue 422: Fixed start_polling with clean=True can cause 'Too Many Requests' error from Telegram. (python-telegram-bot#437)
1 parent 10bdf82 commit 761547e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

telegram/ext/updater.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def _bootstrap(self, max_retries, clean, webhook_url, cert=None):
330330
# Disable webhook for cleaning
331331
self.bot.setWebhook(webhook_url='')
332332
self._clean_updates()
333+
sleep(1)
333334

334335
self.bot.setWebhook(webhook_url=webhook_url, certificate=cert)
335336
except (Unauthorized, InvalidToken):

0 commit comments

Comments
 (0)
X Tutup