You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/03/06 12:46:46 UTC
svn commit: r1785643 - in /tomcat/trunk:
java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml
Author: markt
Date: Mon Mar 6 12:46:45 2017
New Revision: 1785643
URL: http://svn.apache.org/viewvc?rev=1785643&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=60761
Expose a protected getter and setter for NioEndpoint.stopLatch to make the class easier to extend.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1785643&r1=1785642&r2=1785643&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon Mar 6 12:46:45 2017
@@ -215,7 +215,7 @@ public class NioEndpoint extends Abstrac
//minimum one poller thread
pollerThreadCount = 1;
}
- stopLatch = new CountDownLatch(pollerThreadCount);
+ setStopLatch(new CountDownLatch(pollerThreadCount));
// Initialize SSL if needed
initialiseSsl();
@@ -280,7 +280,7 @@ public class NioEndpoint extends Abstrac
pollers[i] = null;
}
try {
- stopLatch.await(selectorTimeout + 100, TimeUnit.MILLISECONDS);
+ getStopLatch().await(selectorTimeout + 100, TimeUnit.MILLISECONDS);
} catch (InterruptedException ignore) {
}
shutdownExecutor();
@@ -326,6 +326,16 @@ public class NioEndpoint extends Abstrac
}
+ protected CountDownLatch getStopLatch() {
+ return stopLatch;
+ }
+
+
+ protected void setStopLatch(CountDownLatch stopLatch) {
+ this.stopLatch = stopLatch;
+ }
+
+
/**
* Process the specified connection.
* @param socket The socket channel
@@ -728,7 +738,7 @@ public class NioEndpoint extends Abstrac
timeout(keyCount,hasEvents);
}//while
- stopLatch.countDown();
+ getStopLatch().countDown();
}
protected void processKey(SelectionKey sk, NioSocketWrapper attachment) {
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1785643&r1=1785642&r2=1785643&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Mar 6 12:46:45 2017
@@ -213,6 +213,11 @@
attribute to avoid problems with Microsoft browsers that do not support
the <code>Max-Age</code> attribute. (markt)
</fix>
+ <fix>
+ <bug>60761</bug>: Expose a protected getter and setter for
+ <code>NioEndpoint.stopLatch</code> to make the class easier to extend.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org