Avoid spurious "Invalid Preserves tag 0" message when server quits before sending anything
This commit is contained in:
parent
2bf2e29dc2
commit
60e6c6badf
|
@ -58,7 +58,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
||||||
let mut buf = [0; 131072];
|
let mut buf = [0; 131072];
|
||||||
let turn_size = {
|
let turn_size = {
|
||||||
stream.read(&mut buf)?;
|
let n = stream.read(&mut buf)?;
|
||||||
|
if n == 0 {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
let mut src = BytesBinarySource::new(&buf);
|
let mut src = BytesBinarySource::new(&buf);
|
||||||
src.packed_iovalues().demand_next(false)?;
|
src.packed_iovalues().demand_next(false)?;
|
||||||
src.index
|
src.index
|
||||||
|
|
Loading…
Reference in New Issue