On 31/07/2010 15:02, ma...@apache.org wrote:
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
This appears to fix the crashes on my Mac. Need to test on Windows as
well since that is where I first saw the issue.
I confess to not understanding why this works, just that it appears to
do the job.
Mark
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
@@ -670,7 +670,7 @@ public class AprEndpoint extends Abstrac
// in the poller can cause problems
try {
synchronized (this) {
- this.wait(pollTime);
+ this.wait(pollTime / 1000);
}
} catch (InterruptedException e) {
// Ignore
@@ -689,6 +689,15 @@ public class AprEndpoint extends Abstrac
}
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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org