Skip to content

fix(realtime): fail presence updates at once when the channel closes - #2089

Merged
spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-3090-realtime-fail-presence-calls-when-the
Nov 16, 2026
Merged

spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-3090-realtime-fail-presence-calls-when-the

Conversation

@spydon

@spydon spydon commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

track() and untrack() fail as soon as the channel closes instead of waiting for the timeout. Fixes SDK-3090. Stacked on #2088.

  • New ChannelClosedError, raised when a phx_close, a phx_error, unsubscribe() or aclose() ends the channel while the call waits. Its reason holds the server's system error sent right before the close, such as Client presence rate limit exceeded.
  • Each join has a close future that _send waits on next to the connection failure, so a reply that already arrived still wins.
  • A per-call timeout is asyncio.timeout() around the call (ruff ASYNC109 rules out a timeout parameter). Documented and tested.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@spydon
spydon added this pull request to stack #2090 November 16, 2026 17:00
Base automatically changed from lukasklingsbo/sdk-2751-realtime-align-presence-with-the to main November 16, 2026 17:01
@spydon
spydon force-pushed the lukasklingsbo/sdk-3090-realtime-fail-presence-calls-when-the branch from 1621efe to a20d09f Compare November 16, 2026 17:01
@spydon
spydon merged commit 5261272 into main Nov 16, 2026
20 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-3090-realtime-fail-presence-calls-when-the branch November 16, 2026 17:01
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.

1 participant