go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

fix(event): handle empty subscription list in JoinSubscriptions

Open forkfury opened this issue 2 days ago • 1 comments

Fix

JoinSubscriptions would block indefinitely when called with zero subscriptions. The select statement had no cases that could complete since no goroutines were spawned to send errors.

Changes

  • Add early return for empty subscription list in JoinSubscriptions
  • Return a subscription that waits for unsubbed channel closure, allowing proper cleanup without blocking
  • Add TestMultisubEmpty to verify the fix and prevent regression

forkfury avatar Dec 09 '25 18:12 forkfury