mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
## Why Stopping proxy listeners could leave accepted connections and half-closed tunnels alive after their owning thread was unloaded. ## What changed Tie HTTP and SOCKS5 connection work, including HTTP CONNECT upgrades, to the lifetime of the proxy listeners. Cancel connections across the main and environment proxies when the handle is dropped, shutdown is requested, or `wait()` is canceled. Explicit shutdown waits for connection cleanup. ## Testing Add live TCP regression tests for HTTP keep-alive connections and open or half-closed HTTP CONNECT and SOCKS5 tunnels across shutdown, handle drop, and canceled waits. Verify that half-closed tunnels still carry return traffic while the proxy is running, and that repeated thread creation and unloading closes managed proxy tunnels. GitOrigin-RevId: b523f3b08d73e9ae368f6932952cc930c7b038c9
13 lines
236 B
Rust
13 lines
236 B
Rust
mod listeners;
|
|
mod scope;
|
|
mod service;
|
|
|
|
pub(crate) use listeners::ProxyListeners;
|
|
#[cfg(test)]
|
|
pub(crate) use scope::ConnectionLifecycle;
|
|
pub(crate) use service::CancelOnShutdown;
|
|
|
|
#[cfg(test)]
|
|
#[path = "lifecycle_tests.rs"]
|
|
mod tests;
|