This commit is contained in:
2025-01-28 17:00:52 +03:00
parent db30857f35
commit 4deb9b60ec

View File

@ -1,4 +1,5 @@
import asyncio
import contextlib
from pathlib import Path
from typing import Generator
@ -39,7 +40,8 @@ class JsonConverter(BaseSession):
ss._dc_id = client.session.dc_id # type: ignore
ss._port = client.session.port # type: ignore
string_session = ss.save()
asyncio.run(client.disconnect()) # type: ignore
with contextlib.suppress(Exception):
asyncio.run(client.disconnect()) # type: ignore
del client
del ss
loop.close()