mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-31 14:25:55 +00:00
Replace create_task with ensure_future for compatibility
This commit is contained in:
@@ -130,7 +130,7 @@ class Dispatcher:
|
||||
for lock in self.locks_list:
|
||||
lock.release()
|
||||
|
||||
asyncio.get_event_loop().create_task(fn())
|
||||
asyncio.ensure_future(fn())
|
||||
|
||||
def remove_handler(self, handler, group: int):
|
||||
async def fn():
|
||||
@@ -146,7 +146,7 @@ class Dispatcher:
|
||||
for lock in self.locks_list:
|
||||
lock.release()
|
||||
|
||||
asyncio.get_event_loop().create_task(fn())
|
||||
asyncio.ensure_future(fn())
|
||||
|
||||
async def update_worker(self, lock):
|
||||
while True:
|
||||
|
Reference in New Issue
Block a user