Author: markt Date: Wed Feb 14 11:57:28 2018 New Revision: 1824228 URL: http://svn.apache.org/viewvc?rev=1824228&view=rev Log: Revert r1823262, the workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=61751 that is now unnecessary.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.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=1824228&r1=1824227&r2=1824228&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Feb 14 11:57:28 2018 @@ -1146,26 +1146,8 @@ public class Nio2Endpoint extends Abstra Future<Integer> integer = null; if (block) { try { - // When reading from an encrypted channel, a read of bytes - // from the network might result in zero application bytes - // after unwrapping. - // Since this is a blocking read, loop until application - // bytes are available. - // Since we are looping, ensure the timeout is updated for - // each loop. - long start = System.currentTimeMillis(); - long timeout = getNio2ReadTimeout(); - while (true) { - integer = getSocket().read(to); - nRead = integer.get(timeout, TimeUnit.MILLISECONDS).intValue(); - if (nRead != 0) { - break; - } - timeout = timeout - (System.currentTimeMillis() - start); - if (timeout < 0) { - throw new TimeoutException(); - } - } + integer = getSocket().read(to); + nRead = integer.get(getNio2ReadTimeout(), TimeUnit.MILLISECONDS).intValue(); } catch (ExecutionException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org