Commit 0b9d446
committed
fix(agent): use is_peer_closed_error for RPC EOF detection
handle_connection treated any read_message error whose string contained
"failed to read message header" as a clean EOF. That substring comes
from anyhow::Context and prefixes *every* header-read failure — clean
EOF, ConnectionReset, BrokenPipe, parse errors, you name it — so real
errors were silently swallowed and never logged.
Switch to the existing `vsock::is_peer_closed_error` helper, which
inspects the underlying io::Error kind for BrokenPipe / ConnectionReset
/ ConnectionAborted / UnexpectedEof. Anything else now propagates and
gets logged at error level by Agent::run.
Pre-existing in master; surfaced by Copilot review on PR #276.1 parent e1933b9 commit 0b9d446
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
0 commit comments