Skip to content

Pull request review#26803

Closed
gambinish wants to merge 4 commits intomainfrom
cursor/pull-request-review-1007
Closed

Pull request review#26803
gambinish wants to merge 4 commits intomainfrom
cursor/pull-request-review-1007

Conversation

@gambinish
Copy link
Copy Markdown
Member

Cancel pending network restore retries when the app resumes to prevent unnecessary reconnections.

The handleAppStateChange method now calls cancelNetworkRestoreRetry() to prevent a race condition where a stale network-restore retry timer could fire after the app-resume path has already successfully re-established the connection, forcing an unwanted disconnect and reconnect.


Open in Web Open in Cursor 

aganglada and others added 4 commits March 2, 2026 14:33
handleAppStateChange did not cancel pending network-restore retry
timers, so a stale timer could fire after the app-resume path already
recovered the connection. Because attemptNetworkRestoreReconnect calls
validateAndReconnect with skipPing=true, the health check that would
detect the healthy connection was bypassed, forcing an unnecessary
disconnect-and-reconnect cycle and briefly disrupting live data streams.

Add cancelNetworkRestoreRetry() at the top of handleAppStateChange so
both recovery paths cannot conflict.

Co-authored-by: Nick Gambino <gambinish@users.noreply.github.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 2, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@metamaskbot metamaskbot added the team-perps Perps team label Mar 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 2, 2026

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main (base: fix/recovering-background)

All E2E tests pre-selected.

View GitHub Actions results

Base automatically changed from fix/recovering-background to main March 2, 2026 17:34
@gambinish gambinish closed this Mar 3, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants