Skip to content

Commit

Permalink
Merge pull request #40 from vibe-d/client_nodelay
Browse files Browse the repository at this point in the history
Use TCP_NODELAY for the client, too
  • Loading branch information
l-kramer authored Jul 12, 2024
2 parents 7e4c53e + 0ab0da0 commit 3420d9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/vibe/http/client.d
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,12 @@ final class HTTPClient {

private auto connectTCPWithTimeout(NetworkAddress addr, NetworkAddress bind_address, Duration timeout)
{
return connectTCP(addr, bind_address, timeout);
auto ret = connectTCP(addr, bind_address, timeout);

// Avoid additional latency in the request-response cycle
ret.tcpNoDelay = true;

return ret;
}

/**
Expand Down

0 comments on commit 3420d9e

Please sign in to comment.