From 4deb9b60ecc3ee801e7050bc631aa1336d588b23 Mon Sep 17 00:00:00 2001 From: trojvn Date: Tue, 28 Jan 2025 17:00:52 +0300 Subject: [PATCH] fix? --- basethon/json_converter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basethon/json_converter.py b/basethon/json_converter.py index a70b35f..edb6c15 100644 --- a/basethon/json_converter.py +++ b/basethon/json_converter.py @@ -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()