tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1142209 - /tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
Date Sat, 02 Jul 2011 12:01:31 GMT
Author: markt
Date: Sat Jul  2 12:01:30 2011
New Revision: 1142209

URL: http://svn.apache.org/viewvc?rev=1142209&view=rev
Log:
Only add instance if it has just been created.

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

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1142209&r1=1142208&r2=1142209&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Sat Jul  2 12:01:30 2011
@@ -845,11 +845,13 @@ public class StandardWrapper extends Con
             }
 
             if (singleThreadModel) {
-                // Have to do this outside of the sync above to prevent a
-                // possible deadlock
-                synchronized (instancePool) {
-                    instancePool.push(instance);
-                    nInstances++;
+                if (newInstance) {
+                    // Have to do this outside of the sync above to prevent a
+                    // possible deadlock
+                    synchronized (instancePool) {
+                        instancePool.push(instance);
+                        nInstances++;
+                    }
                 }
             } else {
                 if (log.isTraceEnabled())



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


Mime
View raw message