Open
Description
The following test results in a BrokenPipe
error in writer.write_all
although all data has been read.
#[tokio::test]
async fn drop_read_exact() {
let (mut writer, mut reader) = pipe();
let write_handle = tokio::spawn(async move {
writer.write_all(&mut [0u8; 8]).await.unwrap();
});
let mut buf = [0u8; 8];
reader.read_exact(&mut buf).await.unwrap();
drop(reader);
write_handle.await.unwrap();
}
I’m looking into how to fix this.
Metadata
Metadata
Assignees
Labels
No labels