fix: detect owned CAD exit during startup without waiting for probe timeout

This commit is contained in:
阿白叔 committed 2026-10-23 16:39:26 +08:00
1 parent 3b8a93e12c
commit 264fee5127
2 files changed
+23

No files matched your search

@@ -128,6 +128,9 @@ class IsolatedCadSession:
deadline = time.monotonic() + 120
while probe.poll() is None:
self._check_abort()
cad_exit = self.cad.poll()
if cad_exit is not None:
raise WorkerMonitorError(f'owned private CAD exited during startup: exit code {cad_exit}')
if time.monotonic() >= deadline:
raise WorkerMonitorError('private CAD bootstrap timed out')
time.sleep(0.05)