Skip to content

Commit

Permalink
fix: handle IO interruptions
Browse files Browse the repository at this point in the history
  • Loading branch information
codahale committed Oct 9, 2023
1 parent ee00833 commit 814467a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ impl Protocol {
writer.write_all(block)?;
n += u64::try_from(x).expect("usize should be <= u64");
}
Err(e) if e.kind() == std::io::ErrorKind::Interrupted => continue,
Err(e) => return Err(e),
}
}
Expand Down

0 comments on commit 814467a

Please sign in to comment.