fix: make ShutdownHandle a private field of LoginServer (#2396)

Folds the top-level `shutdown()` function into a method of
`ShutdownHandle` and then simply stores `ShutdownHandle` on
`LoginServer` since the two fields it contains were always being used
together, anyway.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/2396).
* #2399
* #2398
* __->__ #2396
* #2395
* #2394
* #2393
* #2389
This commit is contained in:
Michael Bolin
2025-08-18 17:57:04 -07:00
committed by GitHub
parent 7f21634165
commit d5b42ba1ac
3 changed files with 13 additions and 19 deletions

View File

@@ -66,7 +66,7 @@ struct ActiveLogin {
impl ActiveLogin {
fn drop(&self) {
self.shutdown_handle.cancel();
self.shutdown_handle.shutdown();
}
}
@@ -190,7 +190,7 @@ impl CodexMessageProcessor {
Ok(Err(err)) => (false, Some(format!("Login server error: {err}"))),
Err(_elapsed) => {
// Timeout: cancel server and report
shutdown_handle.cancel();
shutdown_handle.shutdown();
(false, Some("Login timed out".to_string()))
}
};