Skip to content

Commit 2a2b3fc

Browse files
committed
fix(toolbox-core): Fix accessing async client's session from sync client
1 parent 7256deb commit 2a2b3fc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/toolbox-core/src/toolbox_core/sync_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ def close(self):
6767
Synchronously closes the underlying client session. Doing so will cause
6868
any tools created by this Client to cease to function.
6969
"""
70-
if not self.__async_client.__session.closed:
71-
coro = self.__async_client.close()
72-
run_coroutine_threadsafe(coro, self.__loop).result()
70+
coro = self.__async_client.close()
71+
run_coroutine_threadsafe(coro, self.__loop).result()
7372

7473
def __del__(self):
7574
self.close()

0 commit comments

Comments
 (0)