mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
client: Only wait for the task to be canceled if it's started.
This commit is contained in:
parent
827549ab7c
commit
42fc14ee35
@ -104,7 +104,7 @@ class PanClient(AsyncClient):
|
||||
|
||||
async def loop_stop(self):
|
||||
"""Stop the client loop."""
|
||||
if not self.task:
|
||||
if not self.task or self.task.done():
|
||||
return
|
||||
|
||||
self.task.cancel()
|
||||
|
Loading…
Reference in New Issue
Block a user