fix error

This commit is contained in:
Eric 2024-10-23 18:09:21 +11:00
parent 05fdb0605e
commit b85bb84e3b
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -220,9 +220,10 @@ method unsubscribe*(subscriptions: PollingSubscriptions,
{.async.} = {.async.} =
subscriptions.filters.del(id) subscriptions.filters.del(id)
subscriptions.callbacks.del(id) subscriptions.callbacks.del(id)
let sub = subscriptions.subscriptionMapping[id]
subscriptions.subscriptionMapping.del(id) subscriptions.subscriptionMapping.del(id)
try: try:
discard await subscriptions.client.eth_uninstallFilter(subscriptions.subscriptionMapping[id]) discard await subscriptions.client.eth_uninstallFilter(sub)
except CancelledError as e: except CancelledError as e:
raise e raise e
except CatchableError as e: except CatchableError as e: