Skip to content

Commit 9161508

Browse files
committed
Retry on interruption
1 parent 16424dd commit 9161508

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn read_all<R: Read>(r: &mut R, mut buf: &mut [u8]) -> io::Result<()> {
2424
match r.read(&mut buf[start..]) {
2525
Ok(0) => return Err(io::Error::new(io::ErrorKind::Other, "unexpected EOF")),
2626
Ok(len) => start += len,
27+
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
2728
Err(e) => return Err(e),
2829
}
2930
}

0 commit comments

Comments
 (0)