Skip to content

Commit e4a2365

Browse files
authored
feat(s2n-quic-dc): set linger to 0 (#2407)
1 parent 6d97280 commit e4a2365

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

dc/s2n-quic-dc/src/stream/client/tokio.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ where
6464

6565
// Make sure TCP_NODELAY is set
6666
let _ = socket.set_nodelay(true);
67+
let _ = socket.set_linger(Some(core::time::Duration::ZERO));
6768

6869
// if the acceptor_ip isn't known, then ask the socket to resolve it for us
6970
let peer_addr = if acceptor_addr.ip().is_unspecified() {

dc/s2n-quic-dc/src/stream/server/tokio/tcp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ where
502502
{
503503
// Make sure TCP_NODELAY is set
504504
let _ = stream.set_nodelay(true);
505+
let _ = stream.set_linger(Some(Duration::ZERO));
505506

506507
let meta = event::api::ConnectionMeta {
507508
id: 0, // TODO use an actual connection ID

0 commit comments

Comments
 (0)