mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
code-mode: Remove Session::is_alive() (#29732)
Remove this unused API. This API is insidious in that it implies that alive state should be determinable from the caller, and implies that a preflight should indicate routing. Lets drop this, and handle errors correctly from a failed session in the future.
This commit is contained in:
committed by
GitHub
Unverified
parent
bbbea91960
commit
db6e676afc
@@ -63,10 +63,6 @@ impl<D: SessionRuntimeDelegate> SessionRuntime<D> {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn is_alive(&self) -> bool {
|
||||
!self.inner.shutdown_token.is_cancelled()
|
||||
}
|
||||
|
||||
pub(crate) async fn execute(
|
||||
&self,
|
||||
request: CreateCellRequest,
|
||||
|
||||
@@ -152,7 +152,6 @@ async fn shutdown_rejects_cell_admission_queued_before_the_registry_lock() {
|
||||
})
|
||||
.await;
|
||||
|
||||
assert!(!runtime.is_alive());
|
||||
drop(cells);
|
||||
assert!(matches!(execution.await, Err(Error::ShuttingDown)));
|
||||
assert_eq!(shutdown.await, Ok(()));
|
||||
|
||||
Reference in New Issue
Block a user