Always send full chunks (#4960)

This commit is contained in:
Arkadiy Paronyan 2017-03-19 18:34:31 +01:00 committed by Gav Wood
parent 99c247fe9f
commit 354ec19e3b

View File

@ -271,7 +271,7 @@ impl Manager {
chunk_size += size; chunk_size += size;
} }
trace!("writing {:?}", &hid_chunk[..]); trace!("writing {:?}", &hid_chunk[..]);
let n = handle.write(&hid_chunk[0..chunk_size])?; let n = handle.write(&hid_chunk[..])?;
if n < chunk_size { if n < chunk_size {
return Err(Error::Protocol("Write data size mismatch")); return Err(Error::Protocol("Write data size mismatch"));
} }