Fixes #306028 (Enable TCP_NODELAY by default in client connectors).
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1385 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
a4b09b44da
commit
f9329e1a33
|
@ -47,6 +47,7 @@ jetty-7.0.2.RC0
|
|||
+ Added IPAccessHandler
|
||||
+ Updated Servlet3Continuation to final 3.0.20100224
|
||||
+ 305997 Coalesce buffers in ChannelEndPoint.flush()
|
||||
+ 306028 Enable TCP_NODELAY by default in client connectors
|
||||
|
||||
jetty-7.0.1.v20091125 25 November 2009
|
||||
+ 274251 DefaultServlet supports exact match mode.
|
||||
|
|
|
@ -162,6 +162,7 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector,
|
|||
SocketChannel channel = SocketChannel.open();
|
||||
Address address = destination.isProxied() ? destination.getProxy() : destination.getAddress();
|
||||
channel.configureBlocking( false );
|
||||
channel.socket().setTcpNoDelay(true);
|
||||
channel.connect(address.toSocketAddress());
|
||||
_selectorManager.register( channel, destination );
|
||||
ConnectTimeout connectTimeout = new ConnectTimeout(channel, destination);
|
||||
|
@ -211,7 +212,7 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector,
|
|||
protected void endPointClosed(SelectChannelEndPoint endpoint)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void endPointUpgraded(ConnectedEndPoint endpoint, Connection oldConnection)
|
||||
{
|
||||
|
|
|
@ -54,6 +54,9 @@ class SocketConnector extends AbstractLifeCycle implements HttpClient.Connector
|
|||
socket = SocketFactory.getDefault().createSocket();
|
||||
}
|
||||
|
||||
socket.setSoTimeout(_httpClient.getSoTimeout());
|
||||
socket.setTcpNoDelay(true);
|
||||
|
||||
Address address = destination.isProxied() ? destination.getProxy() : destination.getAddress();
|
||||
socket.connect(address.toSocketAddress(), _httpClient.getConnectTimeout());
|
||||
|
||||
|
@ -73,7 +76,7 @@ class SocketConnector extends AbstractLifeCycle implements HttpClient.Connector
|
|||
{
|
||||
final Connection next = con.handle();
|
||||
if (next!=con)
|
||||
{
|
||||
{
|
||||
con=next;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue