Commit 1686c32d authored by jocutajar's avatar jocutajar

Handle async receiver disconnect as a read error

parent 19255a22
......@@ -89,9 +89,10 @@ impl Read for AsyncReader {
total += 1;
}
Ok(Err(e)) => return Err(e),
Err(e) => {
warn!("Receive error {}", e);
break;
Err(mpsc::TryRecvError::Empty) => break,
Err(mpsc::TryRecvError::Disconnected) => {
warn!("Receiver disconnected");
return Err(io::Error::from(io::ErrorKind::BrokenPipe));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment