fix(a2a): add configurable drain timeout to guard against indefinite block#2337
Merged
fix(a2a): add configurable drain timeout to guard against indefinite block#2337
Conversation
…block (#2329) Add `drain_timeout_ms` (default 30s) to `A2aServerConfig`. Wrap the output_rx drain loop in `tokio::time::timeout`; log a warning and break on expiry instead of blocking indefinitely if the agent loop panics mid-turn while holding the sender Arc.
6f912a8 to
bb5f0a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2329
Summary
drain_timeout_ms: u64(default30_000) toA2aServerConfigwith#[serde(default)]output_rxdrain loop inAgentTaskProcessor::process()withtokio::time::timeouttracing::warn!withtimeout_msfield and break — degraded behavior preferred over deadlockTest plan
cargo nextest run --features full --lib --bins— 6938/6938 passedcargo +nightly fmt --check— cleancargo clippy --features full --workspace -- -D warnings— clean