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);
return 1;
}
@@ -386,7 +387,8 @@ public class SecureNio2Channel extends N
Integer.toString(newLimit)));
netInBuffer = ByteBufferUtils.expand(netInBuffer, newLimit);
- sc.read(netInBuffer, socket, handshakeReadCompletionHandler);
+ sc.read(netInBuffer,
Nio2Endpoint.toNio2Timeout(endpoint.getConnectionTimeout()),
+ TimeUnit.MILLISECONDS, socket,
handshakeReadCompletionHandler);
return 1;
}
@@ -403,7 +405,8 @@ public class SecureNio2Channel extends N
clientRequestedCiphers = extractor.getClientRequestedCiphers();
break;
case NEED_READ:
- sc.read(netInBuffer, socket, handshakeReadCompletionHandler);
+ sc.read(netInBuffer,
Nio2Endpoint.toNio2Timeout(endpoint.getConnectionTimeout()),
+ TimeUnit.MILLISECONDS, socket,
handshakeReadCompletionHandler);
return 1;
case UNDERFLOW:
// Unable to buffer enough data to read SNI extension data
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]