mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Merge pull request #201 from apatrushev/fix-199
process cancellation in dispatch polling
This commit is contained in:
commit
4984c2313a
1 changed files with 2 additions and 0 deletions
|
|
@ -284,6 +284,8 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
try:
|
||||
with self.bot.request_timeout(request_timeout):
|
||||
updates = await self.bot.get_updates(limit=limit, offset=offset, timeout=timeout)
|
||||
except asyncio.CancelledError:
|
||||
break
|
||||
except:
|
||||
log.exception('Cause exception while getting updates.')
|
||||
await asyncio.sleep(error_sleep)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue