1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-22 16:16:40 +00:00

fix failing requests to test server #508

This commit is contained in:
Nikolay Kim 2018-09-11 11:24:05 -07:00
parent 513c8ec1ce
commit 70a3f317d3
3 changed files with 10 additions and 8 deletions

View file

@ -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

View file

@ -1,6 +1,6 @@
[package]
name = "actix-web"
version = "0.7.6"
version = "0.7.7"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
readme = "README.md"

View file

@ -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<T>, _: &mut Context<Self>) -> 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(())