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:
@@ -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()))
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user