Skip to content

Commit 74db820

Browse files
authored
Merge pull request #70 from opentensor/fix/thewhaleking/memleak-in-sync-substrate
Fixes a memory leak
2 parents cc31473 + 25ccdfb commit 74db820

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

async_substrate_interface/sync_substrate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,8 @@ def connect(self, init=False):
581581
if not self.ws.close_code:
582582
return self.ws
583583
else:
584-
return connect(self.chain_endpoint, max_size=self.ws_max_size)
584+
self.ws = connect(self.chain_endpoint, max_size=self.ws_max_size)
585+
return self.ws
585586

586587
def get_storage_item(
587588
self, module: str, storage_function: str, block_hash: str = None

0 commit comments

Comments
 (0)