From 43ea31544be8d211b609498508775be825bb3a69 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 18 Oct 2026 21:31:21 +0200 Subject: [PATCH] native poll: a read that never answers is dropped after 60 s --- apps/host/src/lib/native.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/host/src/lib/native.ts b/apps/host/src/lib/native.ts index 6053f211..49a1d1c1 100644 --- a/apps/host/src/lib/native.ts +++ b/apps/host/src/lib/native.ts @@ -16,7 +16,7 @@ const listeners=new Set<()=>void>(); function put(value:NativeState){if(state&&JSON.stringify(state)===JSON.stringify(value))return;state=value;listeners.forEach(fn=>fn());} /** The host pushes its whole native state (jobs included) at every progress step: the page shows it at once, without waiting for the next poll. */ export function applyNativeEvent(value:unknown){if(value&&typeof value==='object'&&'available' in value&&'jobs' in value)put(value as NativeState);} -const READ_LIMIT_MS=20000; +const READ_LIMIT_MS=60000; function read(force:boolean):Promise{ const request=api.get(`/api/native${force?'?refresh=1':''}`); // A read that never answers must not freeze the page: after the limit the next poll starts a fresh one.