tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1523956 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/AprEndpoint.java
Date Tue, 17 Sep 2013 08:50:00 GMT
Author: markt
Date: Tue Sep 17 08:50:00 2013
New Revision: 1523956

URL: http://svn.apache.org/r1523956
Log:
Fix logic where sendfile thread could get stuck in infinite loop on connector stop.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1523955

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1523956&r1=1523955&r2=1523956&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Sep 17 08:50:00
2013
@@ -1858,6 +1858,7 @@ public class AprEndpoint extends Abstrac
             // in the poller can cause problems
             try {
                 synchronized (this) {
+                    this.notify();
                     this.wait(pollTime / 1000);
                 }
             } catch (InterruptedException e) {
@@ -1962,7 +1963,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) {
@@ -1970,7 +1971,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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message