diff --git a/src/network/stream_reader.rs b/src/network/stream_reader.rs index 6b2af321..c98bdbbc 100644 --- a/src/network/stream_reader.rs +++ b/src/network/stream_reader.rs @@ -193,7 +193,7 @@ mod test { // in async mode let handle = thread::spawn(move || { // We only simulate a single connection. - let mut ostream = listener.incoming().next().unwrap().unwrap(); + let (mut ostream, _) = listener.accept().unwrap(); for piece in pieces { ostream.write_all(&piece[..]).unwrap(); ostream.flush().unwrap();