You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/12/17 16:25:36 UTC
svn commit: r1774793 - in /tomcat/trunk/java/org/apache/tomcat/util/net:
Nio2Endpoint.java NioEndpoint.java
Author: markt
Date: Sat Dec 17 16:25:36 2016
New Revision: 1774793
URL: http://svn.apache.org/viewvc?rev=1774793&view=rev
Log:
Don't set read/write timeouts multiple times.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1774793&r1=1774792&r2=1774793&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Sat Dec 17 16:25:36 2016
@@ -298,12 +298,10 @@ public class Nio2Endpoint extends Abstra
}
Nio2SocketWrapper socketWrapper = new Nio2SocketWrapper(channel, this);
channel.reset(socket, socketWrapper);
- socketWrapper.setReadTimeout(getSocketProperties().getSoTimeout());
- socketWrapper.setWriteTimeout(getSocketProperties().getSoTimeout());
- socketWrapper.setKeepAliveLeft(Nio2Endpoint.this.getMaxKeepAliveRequests());
- socketWrapper.setSecure(isSSLEnabled());
socketWrapper.setReadTimeout(getConnectionTimeout());
socketWrapper.setWriteTimeout(getConnectionTimeout());
+ socketWrapper.setKeepAliveLeft(Nio2Endpoint.this.getMaxKeepAliveRequests());
+ socketWrapper.setSecure(isSSLEnabled());
// Continue processing on another thread
return processSocket(socketWrapper, SocketEvent.OPEN_READ, true);
} catch (Throwable t) {
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1774793&r1=1774792&r2=1774793&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Sat Dec 17 16:25:36 2016
@@ -605,12 +605,10 @@ public class NioEndpoint extends Abstrac
NioSocketWrapper ka = new NioSocketWrapper(socket, NioEndpoint.this);
socket.setSocketWrapper(ka);
ka.setPoller(this);
- ka.setReadTimeout(getSocketProperties().getSoTimeout());
- ka.setWriteTimeout(getSocketProperties().getSoTimeout());
- ka.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests());
- ka.setSecure(isSSLEnabled());
ka.setReadTimeout(getConnectionTimeout());
ka.setWriteTimeout(getConnectionTimeout());
+ ka.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests());
+ ka.setSecure(isSSLEnabled());
PollerEvent r = eventCache.pop();
ka.interestOps(SelectionKey.OP_READ);//this is what OP_REGISTER turns into.
if ( r==null) r = new PollerEvent(socket,ka,OP_REGISTER);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org