mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-26 17:03:09 +00:00
fix(appd): mark session Stopped when WEFT_RUNTIME_BIN is absent
Previously the supervisor returned Ok(()) without updating the session state, leaving it in Starting indefinitely. Now it sets state to Stopped, removes the abort sender, and broadcasts AppState:stopped before returning, consistent with every other early-exit path.
This commit is contained in:
parent
099283bc4b
commit
0fea8f58e4
1 changed files with 7 additions and 0 deletions
|
|
@ -134,6 +134,13 @@ pub(crate) async fn supervise(
|
|||
Ok(b) => b,
|
||||
Err(_) => {
|
||||
tracing::debug!(session_id, %app_id, "WEFT_RUNTIME_BIN not set; skipping process spawn");
|
||||
let mut reg = registry.lock().await;
|
||||
reg.set_state(session_id, AppStateKind::Stopped);
|
||||
reg.remove_abort_sender(session_id);
|
||||
let _ = reg.broadcast().send(Response::AppState {
|
||||
session_id,
|
||||
state: AppStateKind::Stopped,
|
||||
});
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue