diff --git a/aiogram/utils/executor.py b/aiogram/utils/executor.py index 33f80684..fe3483f6 100644 --- a/aiogram/utils/executor.py +++ b/aiogram/utils/executor.py @@ -361,11 +361,11 @@ class Executor: await callback(self.dispatcher) async def _shutdown_polling(self, wait_closed=False): - await self._shutdown() - for callback in self._on_shutdown_polling: await callback(self.dispatcher) + await self._shutdown() + if wait_closed: await self.dispatcher.wait_closed()