Skip to content

fix: Fix possible concurrency issue with secondary app startup#215

Merged
dr1rrb merged 2 commits intomainfrom
dev/dr/devSrvInit
Apr 9, 2026
Merged

fix: Fix possible concurrency issue with secondary app startup#215
dr1rrb merged 2 commits intomainfrom
dev/dr/devSrvInit

Conversation

@dr1rrb
Copy link
Copy Markdown
Member

@dr1rrb dr1rrb commented Apr 9, 2026

linked https://github.com/unoplatform/private/issues/926

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

DevServer.StartCore() starts the dev-server process and returns immediately without waiting for the HTTP endpoint to be ready. When SecondaryApp.RunTest() then launches the child app, the child's RemoteControlClient may attempt to
connect before the server is listening. Since RemoteControlClient does not retry if the initial connection attempt fails, the child app permanently fails to connect, and the hot-reload test times out waiting for the workspace to load.

What is the new behavior?

DevServer.StartCore() now polls the dev-server port with a TCP connect loop (100ms interval, 30s timeout) before returning. This ensures the HTTP endpoint is accepting connections before the child app is launched.

PR Checklist

  • Tested code with current supported SDKs

  • Docs have been added/updated which fit documentation template. (for bug fixes / features)

  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)

  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results.

  • Contains NO breaking changes

  • Updated the Release Notes

  • Associated with an issue (GitHub or internal)

    Other information

    Discovered while setting up [RunsInSecondaryApp] hot-reload runtime tests for Uno Toolkit and Uno Extensions. The race condition is timing-dependent and reproduces more reliably on CI agents.

@dr1rrb dr1rrb enabled auto-merge April 9, 2026 14:24
@dr1rrb dr1rrb merged commit 3bbd572 into main Apr 9, 2026
6 of 8 checks passed
@dr1rrb dr1rrb deleted the dev/dr/devSrvInit branch April 9, 2026 14:37
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