8158690: GET request via HTTP/2 has a huge delays due to Nagle’s Algorithm and Delayed ACK clash
authorskuksenko
Fri, 24 Jun 2016 06:52:29 +0100
changeset 39149 745d93b1bdb3
parent 39148 7d619f151e36
child 39150 cb99396625b4
8158690: GET request via HTTP/2 has a huge delays due to Nagle’s Algorithm and Delayed ACK clash Reviewed-by: chegar
jdk/src/java.httpclient/share/classes/java/net/http/PlainHttpConnection.java
--- a/jdk/src/java.httpclient/share/classes/java/net/http/PlainHttpConnection.java	Fri Jun 24 06:47:32 2016 +0100
+++ b/jdk/src/java.httpclient/share/classes/java/net/http/PlainHttpConnection.java	Fri Jun 24 06:52:29 2016 +0100
@@ -128,6 +128,7 @@
             this.chan = SocketChannel.open();
             int bufsize = client.getReceiveBufferSize();
             chan.setOption(StandardSocketOptions.SO_RCVBUF, bufsize);
+            chan.setOption(StandardSocketOptions.TCP_NODELAY, true);
         } catch (IOException e) {
             throw new InternalError(e);
         }