mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
capnp.AsyncIoStream.create_server() must be called from within an active KJ event loop context. Wrap the entire serve lifecycle in a background asyncio Task that runs under `async with capnp.kj_loop()`, fixing the startup error: "The KJ event-loop is not running on this thread". The server now signals readiness via `_running=True` after bind and the caller polls for up to 1 s before raising if startup fails.