Skip to content

feat(realtime): connect on subscribe when the client has no socket - #780

Merged
Tr00d merged 5 commits into
supabase:masterfrom
fresh55:feat/realtime-deferred-disconnect-reconnect
Nov 18, 2026
Merged

Tr00d merged 5 commits into
supabase:masterfrom
fresh55:feat/realtime-deferred-disconnect-reconnect

Conversation

@fresh55

@fresh55 fresh55 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Subscribe now connects the client when it has no socket, so a channel can be created and subscribed without calling ConnectAsync first, also after the idle disconnect. A channel object kept across a disconnect joins again on the new connection. The idle disconnect stays off by default, and the migration guide notes the default planned for 9.0.0.

@fresh55

fresh55 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@Tr00d last commit turns the idle disconnect on by default (40 s, like other SDKs), which is a breaking change.... I can drop it if you want that in 9.0, but then row just stays partial

@Tr00d

Tr00d commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@fresh55 Indeed, it's a behaviour breaking change. I would keep it for v9 and have a partial capability until then.
I suggest the following:

In this PR:

  • Remove the breaking change
  • Keep the capability as partial, explain "why" in the note
  • Add a section in docs/migrations/v9.0.0.md explaining what will change

Create a brand new PR with the v9.0.0 change:

  • I'll tag it as v9.0.0 and do-not-merge
  • Even if we'll have to deal with conflicts until then, we keep a trace of this one

v9.0.0 work will probably start early next year, so it's not too far away.

What do you think?

@fresh55
fresh55 force-pushed the feat/realtime-deferred-disconnect-reconnect branch from b677ccd to 95dd977 Compare November 18, 2026 08:20
@fresh55 fresh55 changed the title feat(realtime): connect on subscribe and close an idle socket by default feat(realtime): connect on subscribe when the client has no socket Nov 18, 2026
@fresh55

fresh55 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

@Tr00d sounds good, done: default removed, row partial with a note, section added to the v9 guide. I'll open the v9 PR once this one is merged so it only shows the default.

@fresh55
fresh55 force-pushed the feat/realtime-deferred-disconnect-reconnect branch from 95dd977 to a9e5e86 Compare November 18, 2026 08:23
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