From 948354d9f2643d39700639c93b0a05e63e54c6b0 Mon Sep 17 00:00:00 2001 From: Artem Rootman Date: Wed, 9 Sep 2026 15:36:14 +0000 Subject: [PATCH 1/2] fix(rpc): exit newPendingTransactions goroutine when event channel is closed --- rpc/websockets.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpc/websockets.go b/rpc/websockets.go index 39f111bbda..fd330dc647 100644 --- a/rpc/websockets.go +++ b/rpc/websockets.go @@ -734,7 +734,11 @@ func (api *pubSubAPI) subscribePendingTransactions(wsConn *wsConn, subID rpc.ID) errCh := sub.Err() for { select { - case ev := <-txsCh: + case ev, ok := <-txsCh: + if !ok { + return + } + data, ok := ev.Data.(cmttypes.EventDataTx) if !ok { api.logger.Debug("event data type mismatch", "type", fmt.Sprintf("%T", ev.Data)) From 68a4b93c6eaec1c31e1a37f4231223d3b5ab4d12 Mon Sep 17 00:00:00 2001 From: Artem Rootman Date: Wed, 9 Sep 2026 15:36:50 +0000 Subject: [PATCH 2/2] changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 445560fdb4..b2d6b20d4c 100644 --- a/changelog.md +++ b/changelog.md @@ -37,6 +37,7 @@ The `zetacored` binary must be upgraded to trigger chain parameters data migrati * [4509](https://github.com/zeta-chain/node/pull/4509) - use outbound schedule interval in sui cctx scheduling * [4514](https://github.com/zeta-chain/node/pull/4514) - use Zeta height as a factor to calculate the EVM chain artificial height for TSS keysign * [4513](https://github.com/zeta-chain/node/pull/4513) - use `outbound_schedule_interval` and `outbound_schedule_lookahead` in ton cctx scheduling +* [4641](https://github.com/zeta-chain/node/pull/4641) - fix busy-loop goroutine leak in `newPendingTransactions` websocket subscriptions after unsubscribe/disconnect ### Tests