diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs index 05ebe676..efad83d3 100644 --- a/benches/end_to_end.rs +++ b/benches/end_to_end.rs @@ -97,8 +97,8 @@ fn spawn_hello(handle: &Handle) -> SocketAddr { let addr = listener.local_addr().unwrap(); let handle2 = handle.clone(); + let http = hyper::server::Http::new(); handle.spawn(listener.incoming().for_each(move |(socket, addr)| { - let http = hyper::server::Http::new(); http.bind_connection(&handle2, socket, addr, Hello); Ok(()) }).then(|_| Ok(()))); diff --git a/src/server/mod.rs b/src/server/mod.rs index 9bc6c7b2..eb87a622 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -37,7 +37,7 @@ mod response; /// This structure is used to create instances of `Server` or to spawn off tasks /// which handle a connection to an HTTP server. Each instance of `Http` can be /// configured with various protocol-level options such as keepalive. -pub struct Http { +pub struct Http { keep_alive: bool, _marker: PhantomData, }