tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r998446 - in /tomcat/trunk/java/org/apache/tomcat/util/net: JIoEndpoint.java NioEndpoint.java
Date Sat, 18 Sep 2010 11:53:20 GMT
Author: markt
Date: Sat Sep 18 11:53:19 2010
New Revision: 998446

URL: http://svn.apache.org/viewvc?rev=998446&view=rev
Log:
Code clean-up
Align end-point behaviours. Should then be easier to apply async chnages.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=998446&r1=998445&r2=998446&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Sat Sep 18 11:53:19 2010
@@ -180,8 +180,11 @@ public class JIoEndpoint extends Abstrac
                     }
                 }
 
-                // Accept the next incoming connection from the server socket
+                if (!running) {
+                    break;
+                }
                 try {
+                    // Accept the next incoming connection from the server socket
                     Socket socket = serverSocketFactory.acceptSocket(serverSocket);
                     serverSocketFactory.initSocket(socket);
                     // Hand this socket off to an appropriate processor

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=998446&r1=998445&r2=998446&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Sat Sep 18 11:53:19 2010
@@ -761,8 +761,10 @@ public class NioEndpoint extends Abstrac
          */
         @Override
         public void run() {
+            
             // Loop until we receive a shutdown command
             while (running) {
+                
                 // Loop if endpoint is paused
                 while (paused && running) {
                     try {
@@ -771,6 +773,10 @@ public class NioEndpoint extends Abstrac
                         // Ignore
                     }
                 }
+
+                if (!running) {
+                    break;
+                }
                 try {
                     // Accept the next incoming connection from the server socket
                     SocketChannel socket = serverSock.accept();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message