pub(crate) fn await_running_instance<T>(
try_claim: impl FnMut() -> Option<T>,
try_forward: impl FnMut() -> Result<(), ForwardError>,
first: ForwardError,
) -> Handoff<T>Expand description
A relaunch whose forward failed with first: the running instance is
starting (no port file yet) or quitting (its host is gone; a clean exit
deletes the port file). Until QUITTING_INSTANCE_WAIT passes, take the
socket/pipe as soon as the old launcher lets go of it, or forward as soon
as the host answers. Shared by both supervisors.