Enforce a single daemon per geth home
This commit is contained in:
parent
f61cb44dad
commit
ed007a0632
6 changed files with 90 additions and 5 deletions
|
|
@ -21,6 +21,11 @@ registries for pubsub, pipes, and overlays live behind narrow mutex-protected
|
|||
structs in `runtime.rs`.
|
||||
|
||||
Daemon shutdown is an owned lifecycle transition, not process-exit cleanup.
|
||||
Before starting Iroh or background modules, the daemon binds the selected
|
||||
home's local control endpoint. A live endpoint makes a second daemon fail with
|
||||
`daemon_already_running`; only an endpoint that cannot be connected is treated
|
||||
as stale and replaced. This keeps one daemon authoritative for each geth home
|
||||
and prevents a second process from unlinking the first daemon's control path.
|
||||
After local control stops accepting requests, `daemon.rs` cancels the Iroh
|
||||
accept and live-sync tasks, releases native docs/gossip/blob handles, calls
|
||||
`Endpoint::close().await`, and removes the local control socket. The same
|
||||
|
|
|
|||
Loading…
Reference in a new issue