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 2012/03/28 22:35:03 UTC
svn commit: r1306579 -
/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Author: markt
Date: Wed Mar 28 20:35:02 2012
New Revision: 1306579
URL: http://svn.apache.org/viewvc?rev=1306579&view=rev
Log:
Fix intermittent JMX deregistration test failure.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1306579&r1=1306578&r2=1306579&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed Mar 28 20:35:02 2012
@@ -470,6 +470,18 @@ public abstract class AbstractEndpoint {
* Unlock the server socket accept using a bogus connection.
*/
protected void unlockAccept() {
+ // Only try to unlock the acceptor if it is necessary
+ boolean unlockRequired = false;
+ for (Acceptor acceptor : acceptors) {
+ if (acceptor.getState() == AcceptorState.RUNNING) {
+ unlockRequired = true;
+ break;
+ }
+ }
+ if (!unlockRequired) {
+ return;
+ }
+
java.net.Socket s = null;
InetSocketAddress saddr = null;
try {
@@ -678,7 +690,7 @@ public abstract class AbstractEndpoint {
* example, this can happen with the Acceptor thread if the ulimit for open
* files is reached.
*
- * @param currentErrorDelay The current delay beign applied on failure
+ * @param currentErrorDelay The current delay being applied on failure
* @return The delay to apply on the next failure
*/
protected int handleExceptionWithDelay(int currentErrorDelay) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org