Author: remm
Date: Tue Jan 29 08:57:02 2019
New Revision: 1852422
URL: http://svn.apache.org/viewvc?rev=1852422&view=rev
Log:
Additional APR sendfile stop fix
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=1852422&r1=1852421&r2=1852422&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Jan 29
08:57:02 2019
@@ -1977,6 +1977,8 @@ public class AprEndpoint extends Abstrac
protected synchronized void stop() {
sendfileRunning = false;
+ // In case the sendfile thread is in the idle wait
+ this.notify();
// Wait for the sendfile thread to exit, otherwise parallel
// destruction of sockets which are still in the poller can cause
@@ -1993,9 +1995,6 @@ public class AprEndpoint extends Abstrac
if (sendfileThread.isAlive()) {
log.warn(sm.getString("endpoint.sendfileThreadStop"));
}
-
- // In case the sendfile thread is in the idle wait
- this.notify();
}
/**
@@ -2102,7 +2101,7 @@ public class AprEndpoint extends Abstrac
// Loop if endpoint is paused
while (sendfileRunning && paused) {
try {
- Thread.sleep(1000);
+ Thread.sleep(pollTime / 1000);
} catch (InterruptedException e) {
// Ignore
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]