fix(appd): remove abort_sender entry when session supervisor exits

When a runtime process exits naturally (not via TerminateApp) the
oneshot Sender remained in abort_senders until shutdown_all().
Add remove_abort_sender() and call it at the normal exit path in
supervise() to release the entry immediately.
This commit is contained in:
Marco Allegretti 2026-03-11 18:38:35 +01:00
parent 4445b57a7c
commit 6f43490192
2 changed files with 5 additions and 0 deletions

View file

@ -101,6 +101,10 @@ impl SessionRegistry {
}
}
pub(crate) fn remove_abort_sender(&mut self, session_id: u64) {
self.abort_senders.remove(&session_id);
}
pub(crate) fn subscribe(&self) -> tokio::sync::broadcast::Receiver<Response> {
self.broadcast.subscribe()
}

View file

@ -286,6 +286,7 @@ pub(crate) async fn supervise(
{
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,