tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r952001 - /tomcat/trunk/java/org/apache/catalina/core/StandardService.java
Date Sun, 06 Jun 2010 21:51:30 GMT
Author: markt
Date: Sun Jun  6 21:51:30 2010
New Revision: 952001

URL: http://svn.apache.org/viewvc?rev=952001&view=rev
Log:
Remainder of fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49372
Avoid invalid Lifecycle transitions on failed start due to already bound shutdown port

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardService.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardService.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardService.java?rev=952001&r1=952000&r2=952001&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardService.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardService.java Sun Jun  6 21:51:30 2010
@@ -479,7 +479,12 @@ public class StandardService extends Lif
         // Stop our defined Connectors first
         synchronized (connectors) {
             for (int i = 0; i < connectors.length; i++) {
-                ((Lifecycle) connectors[i]).stop();
+                // If Service fails to start, connectors may not have been
+                // started
+                if (!LifecycleState.INITIALIZED.equals(
+                        ((Lifecycle) connectors[i]).getState())) {
+                    ((Lifecycle) connectors[i]).stop();
+                }
             }
         }
 



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


Mime
View raw message