mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-18 13:34:54 +00:00
Await tasks before stopping the session
This commit is contained in:
parent
2b0746a140
commit
6da15b266d
@ -186,10 +186,10 @@ class Session:
|
||||
|
||||
self.connection.close()
|
||||
|
||||
if self.recv_task:
|
||||
await self.recv_task
|
||||
|
||||
self.recv_queue.put_nowait(None)
|
||||
|
||||
if self.net_worker_task:
|
||||
await self.net_worker_task
|
||||
|
||||
for i in self.results.values():
|
||||
|
Loading…
Reference in New Issue
Block a user