logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r386400 - /logging/log4j/trunk/src/java/org/apache/log4j/AsyncAppender.java
Date Thu, 16 Mar 2006 17:40:15 GMT
Author: carnold
Date: Thu Mar 16 09:40:13 2006
New Revision: 386400

URL: http://svn.apache.org/viewcvs?rev=386400&view=rev
Log:
Bug 30106: AsyncAppender can hang if appender logs

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/AsyncAppender.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/AsyncAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/AsyncAppender.java?rev=386400&r1=386399&r2=386400&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/AsyncAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/AsyncAppender.java Thu Mar 16 09:40:13 2006
@@ -182,10 +182,12 @@
         //
         //
         //   if blocking and thread is not already interrupted
+        //      and not the dispatcher then
         //      wait for a buffer notification
         boolean discard = true;
-
-        if (blocking && !Thread.interrupted()) {
+        if (blocking
+                && !Thread.interrupted()
+                && Thread.currentThread() != dispatcher) {
           try {
             buffer.wait();
             discard = false;



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message