Rémy, On 6/2/18 3:40 PM, [email protected] wrote: > Author: remm > Date: Sat Jun 2 19:40:31 2018 > New Revision: 1832744 > > URL: http://svn.apache.org/viewvc?rev=1832744&view=rev > Log: > Add more missing timeouts, submitted by Alex Marchevskiy. > > Modified: > tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java > > Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java?rev=1832744&r1=1832743&r2=1832744&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java > (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Sat > Jun 2 19:40:31 2018 > @@ -371,7 +371,8 @@ public class SecureNio2Channel extends N > // an optimisation for the typical case so we don't create an > // SNIExtractor only to discover there is no data to process > if (netInBuffer.position() == 0) { > - sc.read(netInBuffer, socket, handshakeReadCompletionHandler); > + sc.read(netInBuffer, > Nio2Endpoint.toNio2Timeout(endpoint.getConnectionTimeout()), > + TimeUnit.MILLISECONDS, socket, > handshakeReadCompletionHandler);
Is "Nio2Endpoint.toNio2Timeout(endpoint.getConnectionTimeout())", etc. something worth computing once and storing? I know its a simple comparison, but it could improve CPU usage/performance a small amount. -chris
signature.asc
Description: OpenPGP digital signature
