From b26f08152d7d77d083b4412a53c1c55304a24f7f Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 26 Sep 2010 22:38:14 +0000 Subject: [PATCH] Since SocketStatus is always OPEN or TIMEOUT for BIO, remove the test. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1001546 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/net/JIoEndpoint.java | 42 +++++++++++------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/java/org/apache/tomcat/util/net/JIoEndpoint.java b/java/org/apache/tomcat/util/net/JIoEndpoint.java index 0b9cc9fb7..887b5a0fe 100644 --- a/java/org/apache/tomcat/util/net/JIoEndpoint.java +++ b/java/org/apache/tomcat/util/net/JIoEndpoint.java @@ -540,28 +540,26 @@ public class JIoEndpoint extends AbstractEndpoint { */ public boolean processSocket(SocketWrapper socket, SocketStatus status) { try { - if (status == SocketStatus.OPEN || status == SocketStatus.TIMEOUT) { - if (waitingRequests.remove(socket)) { - SocketProcessor proc = new SocketProcessor(socket,status); - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - try { - //threads should not be created by the webapp classloader - if (Globals.IS_SECURITY_ENABLED) { - PrivilegedAction pa = new PrivilegedSetTccl( - getClass().getClassLoader()); - AccessController.doPrivileged(pa); - } else { - Thread.currentThread().setContextClassLoader( - getClass().getClassLoader()); - } - getExecutor().execute(proc); - }finally { - if (Globals.IS_SECURITY_ENABLED) { - PrivilegedAction pa = new PrivilegedSetTccl(loader); - AccessController.doPrivileged(pa); - } else { - Thread.currentThread().setContextClassLoader(loader); - } + if (waitingRequests.remove(socket)) { + SocketProcessor proc = new SocketProcessor(socket,status); + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + try { + //threads should not be created by the webapp classloader + if (Globals.IS_SECURITY_ENABLED) { + PrivilegedAction pa = new PrivilegedSetTccl( + getClass().getClassLoader()); + AccessController.doPrivileged(pa); + } else { + Thread.currentThread().setContextClassLoader( + getClass().getClassLoader()); + } + getExecutor().execute(proc); + }finally { + if (Globals.IS_SECURITY_ENABLED) { + PrivilegedAction pa = new PrivilegedSetTccl(loader); + AccessController.doPrivileged(pa); + } else { + Thread.currentThread().setContextClassLoader(loader); } } } -- 2.11.0