diff --git a/CHANGES.md b/CHANGES.md index ccb2f1328..77cac1fe2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,14 @@ # Changes -## [0.7.7] - 2018-09-xx +## [0.7.7] - 2018-09-11 ### Fixed * Fix linked list of HttpChannels #504 +* Fix requests to TestServer fail #508 + + ## [0.7.6] - 2018-09-07 ### Fixed diff --git a/Cargo.toml b/Cargo.toml index 6855c0ead..12a1ecf9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-web" -version = "0.7.6" +version = "0.7.7" authors = ["Nikolay Kim "] description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust." readme = "README.md" diff --git a/src/server/http.rs b/src/server/http.rs index f83b74f37..f9b2689ef 100644 --- a/src/server/http.rs +++ b/src/server/http.rs @@ -3,12 +3,11 @@ use std::rc::Rc; use std::sync::Arc; use std::{io, mem, net, time}; -use actix::{Actor, Addr, AsyncContext, Context, Handler, System}; +use actix::{Arbiter, Actor, Addr, AsyncContext, Context, Handler, System}; use futures::{Future, Stream}; use net2::{TcpBuilder, TcpStreamExt}; use num_cpus; -use tokio_current_thread::spawn; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_tcp::TcpStream; @@ -585,7 +584,7 @@ where type Result = (); fn handle(&mut self, msg: Conn, _: &mut Context) -> Self::Result { - spawn(HttpChannel::new( + Arbiter::spawn(HttpChannel::new( Rc::clone(&self.settings), msg.io, msg.peer, @@ -693,7 +692,7 @@ where }; let _ = io.set_nodelay(true); - spawn(HttpChannel::new(h, io, peer)); + Arbiter::spawn(HttpChannel::new(h, io, peer)); } } @@ -753,10 +752,10 @@ where let _ = io.set_nodelay(true); let rate = h.connection_rate(); - spawn(self.acceptor.accept(io).then(move |res| { + Arbiter::spawn(self.acceptor.accept(io).then(move |res| { drop(rate); match res { - Ok(io) => spawn(HttpChannel::new(h, io, peer)), + Ok(io) => Arbiter::spawn(HttpChannel::new(h, io, peer)), Err(err) => trace!("Can not establish connection: {}", err), } Ok(())