Merge pull request #217 from gabbhack/dev-2.x

Fix incorrect completion order.
This commit is contained in:
Alex Root Junior 2019-10-10 17:42:14 +03:00 committed by GitHub
commit 7fb21ead9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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