Repository navigation
fix(realtime): fail a presence call at once when its channel closes or errors - #2237
Merged
spydon merged 3 commits intoDec 2, 2026
Conversation
…r errors A track or untrack sent on a joined channel waited for its reply until its timeout, even after the channel closed or errored, and then resolved with timedOut. No reply can arrive by then, and the server closes the channel instead of replying when a client exceeds its presence rate or size limits. The channel now keeps the presence pushes waiting for a reply and fails them with ChannelResponse.error when it closes or errors.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
DCM's avoid-passing-self-as-argument flagged channel.trigger(..., channel.joinRef).
spydon
approved these changes
Dec 2, 2026
spydon
added a commit
that referenced
this pull request
Dec 2, 2026
…per (#2245) Simplifies how the channel tracks presence pushes awaiting a reply, a follow-up to #2237. - One local `complete` in `send()` settles the call and drops the push from the pending set, replacing the unawaited `whenComplete` per call and four copies of the completer check. - Clear the set before failing its pushes, like the push buffer on close. Closes SDK-3300 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved handling of pending presence updates when a channel send fails, reducing the risk of stale updates or incomplete responses. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.
A
track()oruntrack()waiting for its reply now resolves withChannelResponse.erroras soon as its channel closes or errors, instead of waiting for its timeout and resolving withtimedOut.Closes #2236
_presencePushes, and each one leaves the set once its call completes. When the channel closes or errors, it settles each of them withPush.trigger(PushStatus.error, {}), as_onClosealready does for the buffered pushes. That also cancels their timeout timer.ack, keep waiting for their own timeout.trackanduntrackmention the new outcome.rejoin_test.dartsend a track that gets no reply and then aphx_closeor aphx_errorfrom the server, and check that the call resolves witherrorright away. Both fail without the fix.