diff --git a/app/main.js b/app/main.js index a0d2829..ac4fc92 100644 --- a/app/main.js +++ b/app/main.js @@ -194,6 +194,7 @@ function restartServer() { server = null; url = null; if (old) await endServer(old); + if (starting) await starting.catch(() => {}); // a start it cut short: then start afresh await load(); })().finally(() => { restarting = null; }); } diff --git a/ui/server.py b/ui/server.py index da9ec0a..a2e3ccd 100755 --- a/ui/server.py +++ b/ui/server.py @@ -295,6 +295,12 @@ def status(_body): def headset_view(): """Both eyes as SteamVR composites them (see frame_vrshot.py); PNG bytes.""" + # Counts as work: the copy and clean-up must reach the headset that took the capture. + with working(): + return _headset_view() + + +def _headset_view(): # `timeout`: VR_Init can block if SteamVR is restarting. out = ssh("timeout 15 python3 -", stdin=(HERE / "frame_vrshot.py").read_text(), timeout=30) # SteamVR prints its own notices (e.g. about vrwebhelper) on stdout too, so