diff --git a/crates/weft-appd/src/main.rs b/crates/weft-appd/src/main.rs index b2c51cb..ed9771c 100644 --- a/crates/weft-appd/src/main.rs +++ b/crates/weft-appd/src/main.rs @@ -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 { self.broadcast.subscribe() } diff --git a/crates/weft-appd/src/runtime.rs b/crates/weft-appd/src/runtime.rs index 59fabb3..1306df1 100644 --- a/crates/weft-appd/src/runtime.rs +++ b/crates/weft-appd/src/runtime.rs @@ -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,