Skip to content

fix(realtime): forget a channel on Unsubscribe - #527

Merged
Tr00d merged 4 commits into
supabase:masterfrom
fresh55:fix/realtime-unsubscribe-evict
Oct 22, 2026
Merged

Tr00d merged 4 commits into
supabase:masterfrom
fresh55:fix/realtime-unsubscribe-evict

Conversation

@fresh55

@fresh55 fresh55 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Hit this in Unity 6.3 when a scene subscribes again (closes #319).

After Unsubscribe(), Channel(name) returned the cached channel, so registering presence threw and a new postgres changes handler never fired. The client now forgets a channel when it closes. If the old instance is subscribed again, it is added back, so code that reuses it keeps working.

Channel(name) returned the cached channel after Unsubscribe(), so
presence Register threw and new handlers never fired.
Use OnPostgresChange in the new E2E tests, and move the fake websocket
to Support so the client can connect without a server.
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.

Leaving a presence channel: Unsubscribe() doesn't untrack and re-Register() throws "can only be called once"

2 participants