From bce45f25c09a8981e6a28f0b3569c7ca93ce3adb Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 26 Nov 2024 16:05:06 +0100 Subject: [PATCH] Update pyrogram --- pyrogram_rockserver_storage/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyrogram_rockserver_storage/__init__.py b/pyrogram_rockserver_storage/__init__.py index f80ab54..06d90c9 100644 --- a/pyrogram_rockserver_storage/__init__.py +++ b/pyrogram_rockserver_storage/__init__.py @@ -187,7 +187,10 @@ class RockServerStorage(Storage): async def close(self): """ Close transport """ - await self._client.close() + if self._client is not None: + close_future = self._client.close() + if close_future is not None: + await close_future async def delete(self): """ Delete all the tables and indexes """