Skip to content

feat: implement true p2p connection for mobile and desktop#111

Merged
sirily11 merged 2 commits into
mainfrom
p2p
Jul 1, 2026
Merged

feat: implement true p2p connection for mobile and desktop#111
sirily11 merged 2 commits into
mainfrom
p2p

Conversation

@sirily11

@sirily11 sirily11 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rxcode Ready Ready Preview, Comment Jul 1, 2026 6:54pm

Request Review

On foreground, the app called relay.connect(), which bails when a socket
is still assigned (`guard task == nil`). iOS suspends the process in the
background, so the WebSocket can die without the receive/ping failure
callbacks ever firing to clear `task` and schedule a reconnect — leaving a
stale dead socket that made connect() a permanent no-op.

- Add RelayClient.reconnect(): tears down any existing socket, resets the
  backoff counter, and reopens. SyncClient.start() now uses it (at launch
  task is nil, so it behaves like a plain connect).
- Serialize background/foreground transitions in MobileAppState via a
  lifecycleTask chain so a delayed stop() can't land after a later start()
  and disable the relay for good.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sirily11 sirily11 enabled auto-merge (squash) July 1, 2026 18:53
@sirily11 sirily11 merged commit a1b3e79 into main Jul 1, 2026
14 checks passed
@sirily11 sirily11 deleted the p2p branch July 1, 2026 19:13
@sirily11

sirily11 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant