INNER CODE UNIT · Python

claim_deadline

hi-godot/godot-ai · src/godot_ai/server.py:471

        claim_deadline = loop.time() + 10.0
        while True:
            try:
                http_claim = acquire_port_claim(http_port)
                break
            except PortClaimUnavailable as exc:
                if loop.time() >= claim_deadline:
                    claimed = RuntimeError(
                        f"HTTP port {http_port} is already claimed by another godot-ai server"
                    )
                    report_startup_failure(claimed)
                    raise claimed from exc
                await asyncio.sleep(0.05)
            except OSError as exc:
                ## The claim lives in the capability directory; a directory
                ## this account cannot use fails here, before any listener.
                report_startup_failure(exc)
                raise

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…