fix: avoid stdio-to-uds socket read deadlock in test

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-03-04 14:17:04 -08:00
parent fd620b4fbb
commit cbedebdad5

View File

@@ -35,9 +35,9 @@ fn pipes_stdin_and_stdout_through_socket() -> anyhow::Result<()> {
let (mut connection, _) = listener
.accept()
.context("failed to accept test connection")?;
let mut received = Vec::new();
let mut received = vec![0_u8; b"request".len()];
connection
.read_to_end(&mut received)
.read_exact(&mut received)
.context("failed to read data from client")?;
tx.send(received)
.map_err(|_| anyhow::anyhow!("failed to send received bytes to test thread"))?;