atuinsh/atuin · error · std::io::Error
eof in the middle of a frame
Error message
eof in the middle of a frame
What it means
Error "eof in the middle of a frame" thrown in atuinsh/atuin.
Solutions
- The connection closed mid-frame; retry and check for a crashing peer.
When it happens
Trigger: Fires when the pty-proxy stream ends partway through a frame, indicating a truncated message or dropped peer.
Common situations: See trigger scenarios.
AI-assisted analysis of atuinsh/atuin@15fe1318f1 (2026-08-19).
Data as JSON: /api/errors/3e88a64a7c70aad0.
Report an issue: GitHub.
Appendix: source
Thrown at crates/atuin-pty-proxy/src/protocol.rs:166
if len > MAX_FRAME_LEN {
return Err(io::Error::new(io::ErrorKind::InvalidData, "frame exceeds maximum length"));
}
let mut payload = vec![0u8; len];
reader.read_exact(&mut payload)?;
Ok(Some((frame_type, payload)))
}
/// Fill `buf` completely. Returns `Ok(false)` on EOF before the first byte,
/// `Ok(true)` when full; EOF partway through is an [`io::ErrorKind::UnexpectedEof`].
fn read_exact_or_eof(reader: &mut impl Read, buf: &mut [u8]) -> io::Result<bool> {
let mut filled = 0;
while filled < buf.len() {
match reader.read(&mut buf[filled..]) {
Ok(0) => {
if filled == 0 {
return Ok(false);
}
return Err(io::Error::new(
io::ErrorKind::UnexpectedEof,
"eof in the middle of a frame",
));
}
Ok(n) => filled += n,
Err(e) if e.kind() == io::ErrorKind::Interrupted => {}
Err(e) => return Err(e),
}
}
Ok(true)
}
/// Build a complete Subscribe frame.
///
/// # Panics
///
/// Panics if `token` is longer than `u16::MAX` bytes; real tokens are 64
/// ASCII characters.View on GitHub (pinned to 15fe1318f1)