mirror of
https://github.com/openai/codex.git
synced 2026-02-01 22:47:52 +00:00
Fix: Lower log level for closed-channel send (#9653)
## What? - Downgrade the closed-channel send error log to debug in `codex-rs/core/src/codex.rs`. ## Why? - `async_channel::Sender::send` only fails when the channel is closed, so the current error-level log is noisy during normal shutdown. See issue #9652. ## How? - Replace the error log with a debug log on send failure. ## Tests - `just fmt` - `just fix -p codex-core` - `cargo test -p codex-core`
This commit is contained in:
@@ -1181,7 +1181,7 @@ impl Session {
|
||||
let rollout_items = vec![RolloutItem::EventMsg(event.msg.clone())];
|
||||
self.persist_rollout_items(&rollout_items).await;
|
||||
if let Err(e) = self.tx_event.send(event).await {
|
||||
error!("failed to send tool call event: {e}");
|
||||
debug!("dropping event because channel is closed: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1199,7 +1199,7 @@ impl Session {
|
||||
.await;
|
||||
self.flush_rollout().await;
|
||||
if let Err(e) = self.tx_event.send(event).await {
|
||||
error!("failed to send tool call event: {e}");
|
||||
debug!("dropping event because channel is closed: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user