Skip to content

Commit 7d22919

Browse files
authored
Merge pull request #51 from opentensor/feat/thewhaleking/close-on-gc
Closes the connection on the object being garbage-collected
2 parents 5569cff + f40c8ee commit 7d22919

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

async_substrate_interface/sync_substrate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ def __enter__(self):
525525
self.initialize()
526526
return self
527527

528+
def __del__(self):
529+
self.close()
530+
528531
def initialize(self):
529532
"""
530533
Initialize the connection to the chain.

0 commit comments

Comments
 (0)