From fae20e8f0612094ab41f5b3d8a1e778928607ce8 Mon Sep 17 00:00:00 2001 From: Gareth Morgan Date: Wed, 28 Oct 2026 10:26:55 -0400 Subject: [PATCH] webxr: disable the decoder warm-up timeouts by default A CloudXR runtime with no OpenXR app streams idle frames that count as decoder warm-up frames, so the 10 s begin and 30 s end deadlines can tear down a healthy session that is only waiting for an app to start. Default warmupBeginTimeoutMs and warmupEndTimeoutMs to 0, which disables the detection; callers and the URL/OOB parameters can still set a deadline. Stream-attach detection is unchanged. Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: Gareth Morgan --- .../helpers/react/CloudXRComponent.tsx | 22 +++++++++---------- deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx | 4 ++-- deps/cloudxr/webxr_client/src/index.html | 8 +++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/deps/cloudxr/webxr_client/helpers/react/CloudXRComponent.tsx b/deps/cloudxr/webxr_client/helpers/react/CloudXRComponent.tsx index 13dfbd13b1..ec403c9802 100644 --- a/deps/cloudxr/webxr_client/helpers/react/CloudXRComponent.tsx +++ b/deps/cloudxr/webxr_client/helpers/react/CloudXRComponent.tsx @@ -82,15 +82,15 @@ const IDLE_FRAME_LOG_MESSAGE = 'Received idle frame'; // (or the stream stalled), so the warm-up watchdogs resume. const IDLE_FRAMES_QUIET_MS = 1000; -// Defaults for the warmupBeginTimeoutMs/warmupEndTimeoutMs props below. Both shorter than -// STREAM_ATTACH_BASE_TIMEOUT_MS and, unlike it, neither grows per reconnect attempt (see -// armWarmupBeginTimer/armWarmupEndTimer): once the stream has attached at all, decoder warm-up -// is a fast, bounded startup step (server encoder priming), not something that legitimately -// takes longer on a slow network the way the initial attach can. Split into two deadlines -// because "no warm-up signal at all since attaching" and "warm-up started but never finishes" -// are different failure modes worth distinguishing in the synthetic error message. -const WARMUP_BEGIN_BASE_TIMEOUT_MS = 10000; // 10 seconds - first warm-up log since onStreamStarted -const WARMUP_END_BASE_TIMEOUT_MS = 30000; // 30 seconds - completion since warm-up began +// Defaults for the warmupBeginTimeoutMs/warmupEndTimeoutMs props below. 0 disables warm-up +// detection: a CloudXR runtime with no OpenXR app streams idle frames that count as warm-up +// frames, so a fixed deadline can tear down a healthy session that is only waiting for an app. +// Callers that want detection (e.g. tests) set the props. Neither deadline grows per reconnect +// attempt (see armWarmupBeginTimer/armWarmupEndTimer). Split into two because "no warm-up signal +// at all since attaching" and "warm-up started but never finishes" are different failure modes +// worth distinguishing in the synthetic error message. +const WARMUP_BEGIN_BASE_TIMEOUT_MS = 0; // disabled; first warm-up log since onStreamStarted +const WARMUP_END_BASE_TIMEOUT_MS = 0; // disabled; completion since warm-up began // setTimeout's delay is stored as a 32-bit signed int internally; a value above this overflows // and fires (almost) immediately instead of waiting - the opposite of what a long configured @@ -189,7 +189,7 @@ interface CloudXRComponentProps { * message. Like warmupEndTimeoutMs, does NOT grow per reconnect attempt - warm-up is a fast, * bounded server-side priming step once the stream has attached at all, not something that * legitimately takes longer under retry the way the initial attach can. Defaults to - * WARMUP_BEGIN_BASE_TIMEOUT_MS (10 seconds). A value <= 0 disables this detection, as does + * WARMUP_BEGIN_BASE_TIMEOUT_MS (0, disabled). A value <= 0 disables this detection, as does * warmupEndTimeoutMs <= 0. */ warmupBeginTimeoutMs?: number; @@ -200,7 +200,7 @@ interface CloudXRComponentProps { * the first warm-up log arrives and cleared by WARMUP_COMPLETE_LOG_PATTERN). See * warmupBeginTimeoutMs's doc comment for why this is a separate deadline. Does NOT grow per * reconnect attempt, for the same reason warmupBeginTimeoutMs doesn't. Defaults to - * WARMUP_END_BASE_TIMEOUT_MS (30 seconds). A value <= 0 disables this detection and + * WARMUP_END_BASE_TIMEOUT_MS (0, disabled). A value <= 0 disables this detection and * warmupBeginTimeoutMs too (all warm-up detection); stream-attach detection is unaffected. */ warmupEndTimeoutMs?: number; diff --git a/deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx b/deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx index 77cb2351ad..fadaffbd27 100644 --- a/deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx +++ b/deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx @@ -599,8 +599,8 @@ export class CloudXR2DUI { reconnectMaxAttempts: 3, reconnectDelayMs: 3000, streamAttachTimeoutMs: 120000, - warmupBeginTimeoutMs: 10000, - warmupEndTimeoutMs: 30000, + warmupBeginTimeoutMs: 0, + warmupEndTimeoutMs: 0, teleopPath: DEFAULT_TELEOP_PATH, }; } diff --git a/deps/cloudxr/webxr_client/src/index.html b/deps/cloudxr/webxr_client/src/index.html index 511ddab93e..fb797d070f 100644 --- a/deps/cloudxr/webxr_client/src/index.html +++ b/deps/cloudxr/webxr_client/src/index.html @@ -1570,7 +1570,7 @@

Advanced settings

Warm-up Begin Timeout (ms, default: 0 / disabled) Advanced settings step="1000" placeholder="Warm-up begin timeout in ms" spellcheck="false" - value="10000" + value="0" />
How long to wait, after the stream attaches, for the first sign that decoder @@ -1592,7 +1592,7 @@

Advanced settings

Warm-up End Timeout (ms, default: 0 / disabled) Advanced settings step="1000" placeholder="Warm-up end timeout in ms" spellcheck="false" - value="30000" + value="0" />
How long to wait for decoder warm-up to finish once it has begun before treating