Skip to content

fix(mobile): Clean up sockets when simulation starts#380

Open
Gujiassh wants to merge 1 commit intoruvnet:mainfrom
Gujiassh:refresh/ws-empty-url-cleans-up-20260411
Open

fix(mobile): Clean up sockets when simulation starts#380
Gujiassh wants to merge 1 commit intoruvnet:mainfrom
Gujiassh:refresh/ws-empty-url-cleans-up-20260411

Conversation

@Gujiassh
Copy link
Copy Markdown

Summary

  • rebase the previous fix onto current main
  • close active WebSocket and cancel pending reconnect timer when URL becomes empty
  • keep simulation mode isolated from stale socket reconnect races

Testing

  • npm --prefix ui/mobile test -- --runInBand src/__tests__/services/ws.service.test.ts -t "cleans up active sockets and pending reconnects when switching to simulation mode"

Context

Replacement for closed PR #240 with still-real diff on current main.

When the server URL is cleared, close the active WebSocket and cancel pending reconnects so simulation mode does not race with stale network state.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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