mirror of
https://github.com/TencentCloud/Octop.git
synced 2026-10-02 07:34:38 +08:00
`streamMobileSse` reports completion through `onDone`, but it was the only
stream in `api/modules` that could end without calling it - and the only one
that could call it twice.
* The read loop breaks on EOF and the `.then` body just returns. When the body
closes without a terminal frame the callback never fires; `desktop.ts` and
`browser.ts` both settle after their loop. Mobile can really truncate:
`infra/mobile/setup.py` spawns `bash` with no guard, so a host without a
shell raises before the router can write its `{"done": ...}` frame.
* A terminal frame did not stop the loop, so any later frame fired `onDone`
again. `desktop.ts`/`browser.ts` `return` straight after settling.
`pages/Control/RemoteAndroid` only leaves its "installing" phase inside
`onDone`, so the first case leaves the panel spinning with the install button
disabled and no toast, and the second runs the completion path twice.
Both paths now funnel through a one-shot `settle()`.