mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-28 01:52:57 +01:00
set nodelay for streams
This commit is contained in:
parent
91230afc44
commit
20d5c61c11
@ -209,6 +209,7 @@ impl StreamHandlerType {
|
|||||||
hnd: &Handle, msg: Conn<net::TcpStream>) {
|
hnd: &Handle, msg: Conn<net::TcpStream>) {
|
||||||
match *self {
|
match *self {
|
||||||
StreamHandlerType::Normal => {
|
StreamHandlerType::Normal => {
|
||||||
|
let _ = msg.io.set_nodelay(true);
|
||||||
let io = TcpStream::from_stream(msg.io, hnd)
|
let io = TcpStream::from_stream(msg.io, hnd)
|
||||||
.expect("failed to associate TCP stream");
|
.expect("failed to associate TCP stream");
|
||||||
|
|
||||||
@ -217,6 +218,7 @@ impl StreamHandlerType {
|
|||||||
#[cfg(feature="tls")]
|
#[cfg(feature="tls")]
|
||||||
StreamHandlerType::Tls(ref acceptor) => {
|
StreamHandlerType::Tls(ref acceptor) => {
|
||||||
let Conn { io, peer, http2 } = msg;
|
let Conn { io, peer, http2 } = msg;
|
||||||
|
let _ = io.set_nodelay(true);
|
||||||
let io = TcpStream::from_stream(io, hnd)
|
let io = TcpStream::from_stream(io, hnd)
|
||||||
.expect("failed to associate TCP stream");
|
.expect("failed to associate TCP stream");
|
||||||
|
|
||||||
@ -235,6 +237,7 @@ impl StreamHandlerType {
|
|||||||
#[cfg(feature="alpn")]
|
#[cfg(feature="alpn")]
|
||||||
StreamHandlerType::Alpn(ref acceptor) => {
|
StreamHandlerType::Alpn(ref acceptor) => {
|
||||||
let Conn { io, peer, .. } = msg;
|
let Conn { io, peer, .. } = msg;
|
||||||
|
let _ = io.set_nodelay(true);
|
||||||
let io = TcpStream::from_stream(io, hnd)
|
let io = TcpStream::from_stream(io, hnd)
|
||||||
.expect("failed to associate TCP stream");
|
.expect("failed to associate TCP stream");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user