Repository navigation
Conversation
Collaborator
|
Thanks @Osraka, this is a clean fix, and the tests made it quick to verify. We've recreated it in our internal monorepo with you credited as co-author, and it will ship in the next Two notes from review:
This repo is a read-only mirror, so we can't merge PRs here, but we read every one. Appreciate the careful work. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Related to #2029.
callerHandle()can remove a caller fromsubscription.callbackListwhilesendJoin()is notifying that list. Iterating the live array then skips the next caller after a self-unsubscribe. This affects successful joins, rejected joins, and join timeouts.Solution
Iterate a snapshot in those three join-result paths, but notify only callers that are still registered. This lets a caller remove itself without starving a sibling while preserving the behavior where a caller removed by another callback receives no notification. No public API changes.
Offline regression tests cover success, rejection, timeout, and removal of a different caller. Validation: 56 transport tests, 1,304 SDK unit tests,
npm run check-types,npm run build, Biome on the two changed files, andgit diff --check. The self-unsubscribe tests failed onmain; the cross-unsubscribe test caught an issue in the first patch before the follow-up fix. No live OpenSea request was made.