🐛 Use the Executor's event loop

Instead of creating a new one. So that the event loop
can actually be passed to `Executor()` and used in the
`Executor().start_polling()` method.
This commit is contained in:
Mykola Solodukha 2022-03-04 22:05:25 +02:00
parent fe48a4a014
commit a036adc046

View file

@ -314,7 +314,7 @@ class Executor:
:param timeout:
"""
self._prepare_polling()
loop = asyncio.get_event_loop()
loop: asyncio.AbstractEventLoop = self.loop
try:
loop.run_until_complete(self._startup_polling())