Skip to content

Commit f40c8ee

Browse files
committed
Closes the connection on the object being garbage-collected.
1 parent 5569cff commit f40c8ee

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)