fix(host): a bridge that held a host follows the app that takes its place
Plan P15 unit A5, fix round. A bridge started under a `serve` host, when that host went and the app started in its place, took a lease on the app's server: a lease with no host behind it, which never ends. When the app later closed, the assistant got a generic timeout and never "Wanderbooks isn't running". A lease with no host now turns the bridge into the line to whatever runs, as a bridge that began without a host is (`Lease::is_hostless`, `Bridge::keep`), and it answers in the same words when the app is closed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
2ff2913274
commit
6164d0fa68
2 files changed
+18
No files matched your search
@@ -166,6 +166,13 @@ struct HostLink {
|
||||
}
|
||||
|
||||
impl Lease {
|
||||
/// Whether this lease is on the app's server with no host behind it
|
||||
/// (INVARIANT 6): it never ends, so a holder that has one follows
|
||||
/// what runs by looking, as a bridge with no host does.
|
||||
pub fn is_hostless(&self) -> bool {
|
||||
self.link.is_none()
|
||||
}
|
||||
|
||||
/// The host's next word: `Ready`, or `Ending` with why; `None` when
|
||||
/// the host is gone without a word.
|
||||
pub async fn next(&mut self) -> Option<HostMsg> {
|
||||
|
||||
Reference in new issue
Block a user