Fixed close down, and degraded a message to debug
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 9 Aug 2006 21:22:24 +0000 (21:22 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 9 Aug 2006 21:22:24 +0000 (21:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@430148 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/NioEndpoint.java

index 315c059..77fda3b 100644 (file)
@@ -153,7 +153,6 @@ public class NioEndpoint {
 
     protected ConcurrentLinkedQueue<NioChannel> nioChannels = new ConcurrentLinkedQueue<NioChannel>() {
         public boolean offer(NioChannel o) {
-            if ( getSecure() ) return false;
             //avoid over growing our cache or add after we have stopped
             if ( running && (size() < curThreads) ) return super.offer(o);
             else return false;
@@ -961,9 +960,10 @@ public class NioEndpoint {
             // Wait for polltime before doing anything, so that the poller threads
             // exit, otherwise parallel descturction of sockets which are still
             // in the poller can cause problems
+            close = true;
             try {
                 synchronized (this) {
-                    this.wait(pollTime / 1000);
+                    this.wait(selectorTimeout * 2);
                 }
             } catch (InterruptedException e) {
                 // Ignore
@@ -1350,7 +1350,7 @@ public class NioEndpoint {
                             handshake = socket.handshake(key.isReadable(), key.isWritable());
                         }catch ( IOException x ) {
                             handshake = -1;
-                            log.error("Error during SSL handshake",x);
+                            if ( log.isDebugEnabled() ) log.debug("Error during SSL handshake",x);
                         }catch ( CancelledKeyException ckx ) {
                             handshake = -1;
                         }