pub(crate) async fn close_due(state: &AppState)
The sessions that are due to close: those of an agent that was stopped, and of one that has done nothing for an hour. Called every minute and when an agent is stopped.