Skip to content

Commit cd49ef8

Browse files
committed
Fix: asyncio.run cannot run inside a loop
1 parent 4f942d8 commit cd49ef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aleph/sdk/chains/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async def from_crypto_host(
6565
)
6666

6767
def __del__(self):
68-
asyncio.run(self._session.close())
68+
asyncio.get_running_loop().create_task(self._session.close())
6969

7070
@property
7171
def private_key(self):

0 commit comments

Comments
 (0)