Skip to content

Commit

Permalink
test(server): fix 100-continue server tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Oct 25, 2018
1 parent 30f9752 commit 571567c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,9 @@ impl<H: Handler + 'static> Worker<H> {
}
};

// FIXME: Use Type ascription
let stream2: &mut NetworkStream = &mut stream.clone();
let stream3: &mut NetworkStream = &mut stream.clone();
let mut rdr = BufReader::new(stream2);
let mut wrt = BufWriter::new(stream3);
let mut wrt = BufWriter::new(stream);

while self.keep_alive_loop(&mut rdr, &mut wrt, addr) {
if let Err(e) = self.set_read_timeout(*rdr.get_ref(), self.timeouts.keep_alive) {
Expand All @@ -292,7 +290,7 @@ impl<H: Handler + 'static> Worker<H> {

debug!("keep_alive loop ending for {}", addr);

if let Err(e) = stream.close(Shutdown::Both) {
if let Err(e) = rdr.get_mut().close(Shutdown::Both) {
info!("failed to close stream: {}", e);
}
}
Expand Down

0 comments on commit 571567c

Please sign in to comment.