Skip to content

Commit 5b97c88

Browse files
committed
Change where _in_use_ids gets updated.
1 parent b1f9157 commit 5b97c88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

async_substrate_interface/async_substrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ async def _recv(self) -> None:
619619
self._open_subscriptions -= 1
620620
if "id" in response:
621621
self._received[response["id"]] = response
622+
self._in_use_ids.remove(response["id"])
622623
elif "params" in response:
623624
self._received[response["params"]["subscription"]] = response
624625
else:
@@ -674,7 +675,6 @@ async def retrieve(self, item_id: int) -> Optional[dict]:
674675
"""
675676
try:
676677
item = self._received.pop(item_id)
677-
self._in_use_ids.remove(item_id)
678678
self.max_subscriptions.release()
679679
return item
680680
except KeyError:

0 commit comments

Comments
 (0)