Honor the OpenCode recovery deadline

This commit is contained in:
Nick Sweeting 2026-09-02 23:57:59 -07:00
parent 944907bfee
commit 8a12e3399c
No known key found for this signature in database

View File

@ -411,7 +411,9 @@ def _ensure_opencode(settings: dict) -> tuple[bool, str]:
if remaining <= 0:
break
if _health(settings, timeout=min(2, remaining)):
return True, ""
if time.monotonic() <= deadline:
return True, ""
break
remaining = deadline - time.monotonic()
if remaining > 0:
time.sleep(min(0.25, remaining))