mirror of
https://github.com/openai/codex.git
synced 2026-05-01 03:42:05 +03:00
tui_app_server: cancel active login before Ctrl+C exit (#15673)
## Summary Fixes slow `Ctrl+C` exit from the ChatGPT browser-login screen in `tui_app_server`. ## Root cause Onboarding-level `Ctrl+C` quit bypassed the auth widget's cancel path. That let the active ChatGPT login keep running, and in-process app-server shutdown then waited on the stale login attempt before finishing. ## Changes - Extract a shared `cancel_active_attempt()` path in the auth widget - Use that path from onboarding-level `Ctrl+C` before exiting the TUI - Add focused tests for canceling browser-login and device-code attempts - Add app-server shutdown cleanup that explicitly drops any active login before draining background work
This commit is contained in:
@@ -451,6 +451,10 @@ impl MessageProcessor {
|
||||
self.codex_message_processor.drain_background_tasks().await;
|
||||
}
|
||||
|
||||
pub(crate) async fn cancel_active_login(&self) {
|
||||
self.codex_message_processor.cancel_active_login().await;
|
||||
}
|
||||
|
||||
pub(crate) async fn clear_all_thread_listeners(&self) {
|
||||
self.codex_message_processor
|
||||
.clear_all_thread_listeners()
|
||||
|
||||
Reference in New Issue
Block a user