Skip to content

Conversation

@forkfury
Copy link

@forkfury forkfury commented Dec 9, 2025

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 forkfury requested a review from fjl as a code owner December 9, 2025 18:39
@rjl493456442
Copy link
Member

I am not sure if it's necessary. We probably can always hold the assumption that the provided subscription list shouldn't be empty.

The change is pretty simple though.

@fjl fjl changed the title fix(event): handle empty subscription list in JoinSubscriptions event: handle empty subscription list in JoinSubscriptions Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants