Skip to content

fix(api): Don't block subscription events during WebSocket reconnect - #7282

Open
VarshithaPamisetty wants to merge 6 commits into
mainfrom
fix/api-subscription-events-blocked-on-reconnect
Open

fix(api): Don't block subscription events during WebSocket reconnect#7282
VarshithaPamisetty wants to merge 6 commits into
mainfrom
fix/api-subscription-events-blocked-on-reconnect

Conversation

@VarshithaPamisetty

Copy link
Copy Markdown
Contributor

Description

The WebSocket reconnect ran on the serial event queue (asyncExpand), so a slow reconnect blocked every event behind it: subscription data and keep-alives were received but never processed, freezing active subscriptions on a healthy socket. This moves reconnect off the queue so events keep flowing, and guards against shutdown mid-reconnect.

Testing

  • Regression test: data flows during an in-progress reconnect (fails without the change); plus a clean-shutdown-mid-reconnect test.
  • WebSocket suite 35/35; analyze/format clean (Dart 3.11 and 3.13).
  • Verified e2e against live AppSync: delivery, reconnect recovery, new subscription mid-reconnect.

Fixes #7001

@VarshithaPamisetty VarshithaPamisetty self-assigned this Aug 17, 2026
@codecov-commenter

codecov-commenter commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.98%. Comparing base (877bd59) to head (204d187).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7282   +/-   ##
=======================================
  Coverage   40.98%   40.98%           
=======================================
  Files         121      121           
  Lines        8273     8273           
  Branches     3598     3598           
=======================================
  Hits         3391     3391           
  Misses       4882     4882           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@VarshithaPamisetty
VarshithaPamisetty marked this pull request as ready for review August 18, 2026 11:43
@VarshithaPamisetty
VarshithaPamisetty requested a review from a team as a code owner August 18, 2026 11:43
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.

Subscription events are blocked while reconnect retry is in progress

2 participants