mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
explicitly set tcp nodelay
This commit is contained in:
parent
d6b021e185
commit
cbb821148b
@ -32,9 +32,10 @@ pub struct HttpChannel<T, H> where T: IoStream, H: HttpHandler + 'static {
|
|||||||
impl<T, H> HttpChannel<T, H> where T: IoStream, H: HttpHandler + 'static
|
impl<T, H> HttpChannel<T, H> where T: IoStream, H: HttpHandler + 'static
|
||||||
{
|
{
|
||||||
pub(crate) fn new(settings: Rc<WorkerSettings<H>>,
|
pub(crate) fn new(settings: Rc<WorkerSettings<H>>,
|
||||||
io: T, peer: Option<SocketAddr>, http2: bool) -> HttpChannel<T, H>
|
mut io: T, peer: Option<SocketAddr>, http2: bool) -> HttpChannel<T, H>
|
||||||
{
|
{
|
||||||
settings.add_channel();
|
settings.add_channel();
|
||||||
|
let _ = io.set_nodelay(true);
|
||||||
|
|
||||||
if http2 {
|
if http2 {
|
||||||
HttpChannel {
|
HttpChannel {
|
||||||
|
Loading…
Reference in New Issue
Block a user