Skip to main content

reacquire

Function reacquire 

Source
pub fn reacquire(ctx: &ServiceContext, name: &str) -> bool
Expand description

Re-acquire a service by name after its previous instance died.

The answer to an Error::Unreachable: the name is stable, the instance is not (CLAUDE.md invariant 11). Returns true if a fresh capability was installed.

Re-acquiring the endpoint is necessary and not sufficient. Anything you derived from the DEAD instance - an open file, a socket, a connection id, a cached copy of its state - was issued by a service that no longer exists and the new one has never heard of. Re-establish those too, or you are holding a handle the new instance will refuse (CLAUDE.md 14.3).