Java Mailing List Archive

http://www.junlu.com/

Home » dev.tomcat »

svn commit: r981061 -
/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Mark Thomas

2010-07-31

Replies: Find Java Web Hosting

Author LoginPost Reply
Author: markt
Date: Sat Jul 31 14:02:29 2010
New Revision: 981061

URL: http://svn.apache.org/viewvc?rev=981061&view=rev
Log:
Revert r966596 - pollTime is in microseconds, wait is in milliseconds
Add an additional wait that prevents a JVM crash on shutdown detected in TestAsyncContextImpl tests

Modified:
  tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=981061&r1=981060&r2=981061&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Sat Jul 31 14:02:29 2010
@@(protected)
        // in the poller can cause problems
        try {
          synchronized (this) {
-             this.wait(pollTime);
+             this.wait(pollTime / 1000);
          }
        } catch (InterruptedException e) {
          // Ignore
@@(protected)
          }
          sendfiles = null;
        }
+        // Wait another polltime to make sure everything is shutdown else
+        // the JVM will crash when we terminate the APR library
+        try {
+           synchronized (this) {
+             this.wait(pollTime / 1000);
+           }
+        } catch (InterruptedException e) {
+           // Ignore
+        }
     }
     shutdownExecutor();
  }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.