Handle ErrorKind::Interrupted when doing stream IO

When doing IO with the underlying stream object, we should handle
the special case of ErrorKind::Interrupted, otherwise the connection
will be closed incorrectly.

Quotation from Rust doc:
An error of the [`ErrorKind::Interrupted`] kind is non-fatal and the
read operation should be retried if there is nothing else to do.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
This commit is contained in:
Liu Jiang
2020-03-28 16:04:18 +08:00
committed by Andreea Florescu
parent 0d87a94c8e
commit c9ffb90aeb
2 changed files with 13 additions and 15 deletions

View File

@@ -1 +1 @@
{"coverage_score": 93.2, "exclude_path": "", "crate_features": ""}
{"coverage_score": 92.8, "exclude_path": "", "crate_features": ""}