This commit is contained in:
Albert Armea 2026-01-01 22:55:53 -05:00
parent 66cfcce29d
commit 60d5d9f1f1

View file

@ -231,15 +231,13 @@ impl Service {
let engine = engine.lock().await;
if let Some(session) = engine.current_session() {
info!(session_id = %session.plan.session_id, "Stopping active session");
if let Some(handle) = &session.host_handle {
if let Err(e) = host.stop(handle, HostStopMode::Graceful {
if let Some(handle) = &session.host_handle && let Err(e) = host.stop(handle, HostStopMode::Graceful {
timeout: Duration::from_secs(5),
}).await {
warn!(error = %e, "Failed to stop session gracefully");
}
}
}
}
// Log shutdown
if let Err(e) = store.append_audit(AuditEvent::new(AuditEventType::ServiceStopped)) {