Author: markt
Date: Tue Sep 17 08:49:03 2013
New Revision: 1523955
URL: http://svn.apache.org/r1523955
Log:
Fix logic where sendfile thread could get stuck in infinite loop on connector
stop.
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=1523955&r1=1523954&r2=1523955&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Sep 17
08:49:03 2013
@@ -1910,6 +1910,7 @@ public class AprEndpoint extends Abstrac
// in the poller can cause problems
try {
synchronized (this) {
+ this.notify();
this.wait(pollTime / 1000);
}
} catch (InterruptedException e) {
@@ -2014,7 +2015,7 @@ public class AprEndpoint extends Abstrac
while (sendfileRunning) {
// Loop if endpoint is paused
- while (paused) {
+ while (sendfileRunning && paused) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
@@ -2022,7 +2023,7 @@ public class AprEndpoint extends Abstrac
}
}
// Loop if poller is empty
- while (sendfileCount < 1 && addS.size() < 1) {
+ while (sendfileRunning && sendfileCount < 1 && addS.size() <
1) {
// Reset maintain time.
maintainTime = 0;
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]