Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/s3s-fs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ async fn run(opt: Opt) -> Result {
}
};

// Without it a response written as a head and a body holds the body
// until the client ACKs the head, which a delayed-ACK client takes
// 40 ms to do.
if let Err(err) = socket.set_nodelay(true) {
tracing::debug!("could not set TCP_NODELAY on an accepted connection: {err}");
}

let conn = http_server.serve_connection(TokioIo::new(socket), service.clone());
let conn = graceful.watch(conn.into_owned());
tokio::spawn(async move {
Expand Down
Loading