From a1b8e4880d24d5e618b0637defa380d75e30c831 Mon Sep 17 00:00:00 2001 From: CertiK <138698582+CertiK-Geth@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:34:30 +0800 Subject: [PATCH] eth/filters: terminate pending tx subscription on error (#32794) Fixes issue #32793. When the pending tx subscription ends, the filter is removed from `api.filters`, but it is not terminated. There is no other way to terminate it, so the subscription will leak, and potentially block the producer side. --- eth/filters/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/eth/filters/api.go b/eth/filters/api.go index d678c40389..334a19f0b5 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -152,6 +152,7 @@ func (api *FilterAPI) NewPendingTransactionFilter(fullTx *bool) rpc.ID { api.filtersMu.Lock() delete(api.filters, pendingTxSub.ID) api.filtersMu.Unlock() + pendingTxSub.Unsubscribe() return } }