diff --git a/src/network/stream_reader.rs b/src/network/stream_reader.rs index e3d5b81d..ff2a99c6 100644 --- a/src/network/stream_reader.rs +++ b/src/network/stream_reader.rs @@ -207,7 +207,7 @@ mod test { let mut ostream = ostream.unwrap(); for piece in pieces { - ostream.write(&piece[..]).unwrap(); + ostream.write_all(&piece[..]).unwrap(); ostream.flush().unwrap(); thread::sleep(Duration::from_secs(1)); }