From 91615088f5599d0347550cc611b79bb103849dbc Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 2 May 2015 16:12:23 -0700 Subject: [PATCH] Retry on interruption --- src/util.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.rs b/src/util.rs index cdb2a56a..afbb5f7e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -24,6 +24,7 @@ pub fn read_all(r: &mut R, mut buf: &mut [u8]) -> io::Result<()> { match r.read(&mut buf[start..]) { Ok(0) => return Err(io::Error::new(io::ErrorKind::Other, "unexpected EOF")), Ok(len) => start += len, + Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {} Err(e) => return Err(e), } }