diff --git a/dc/s2n-quic-dc/src/stream/client/tokio.rs b/dc/s2n-quic-dc/src/stream/client/tokio.rs index d1c85c528..a4785f075 100644 --- a/dc/s2n-quic-dc/src/stream/client/tokio.rs +++ b/dc/s2n-quic-dc/src/stream/client/tokio.rs @@ -64,6 +64,7 @@ where // Make sure TCP_NODELAY is set let _ = socket.set_nodelay(true); + let _ = socket.set_linger(Some(core::time::Duration::ZERO)); let local_port = socket.local_addr()?.port(); let stream = endpoint::open_stream( diff --git a/dc/s2n-quic-dc/src/stream/server/tokio/tcp.rs b/dc/s2n-quic-dc/src/stream/server/tokio/tcp.rs index b4dd603e0..86740dbc1 100644 --- a/dc/s2n-quic-dc/src/stream/server/tokio/tcp.rs +++ b/dc/s2n-quic-dc/src/stream/server/tokio/tcp.rs @@ -502,6 +502,7 @@ where { // Make sure TCP_NODELAY is set let _ = stream.set_nodelay(true); + let _ = stream.set_linger(Some(Duration::ZERO)); let meta = event::api::ConnectionMeta { id: 0, // TODO use an actual connection ID