Skip to content

fix: reconnect immediately on app resume - #71

Open
jcpsimmons wants to merge 3 commits into
shellular-org:devfrom
jcpsimmons:fix/immediate-resume-reconnect
Open

fix: reconnect immediately on app resume#71
jcpsimmons wants to merge 3 commits into
shellular-org:devfrom
jcpsimmons:fix/immediate-resume-reconnect

Conversation

@jcpsimmons

Copy link
Copy Markdown

Summary

  • bypass reconnect backoff for explicit app-resume and network-online recovery
  • preserve jittered backoff for ordinary disconnect retries
  • add regression tests for immediate and normal reconnect timing

Why

reconnectNow() describes an immediate reconnect, but the reconnect-ticket refactor removed its immediate flag. Resume recovery therefore waits 800–1200 ms before opening a socket, long enough to show the 700 ms reconnecting overlay on every iOS foreground transition.

This restores the earlier immediate-resume behavior while keeping the newer reconnect-ticket caching logic.

Verification

  • pnpm test (119 tests passed)
  • pnpm typecheck
  • pnpm exec biome check src/state/connection.ts src/state/reconnectDelay.ts src/state/reconnectDelay.test.ts
  • iOS webpack bundle compiled successfully; the native archive step could not run in Linux because xcodebuild is unavailable

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