directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r326057 - /directory/network/trunk/src/java/org/apache/mina/filter/ThreadPoolFilter.java
Date Tue, 18 Oct 2005 09:21:38 GMT
Author: trustin
Date: Tue Oct 18 02:21:35 2005
New Revision: 326057

URL: http://svn.apache.org/viewcvs?rev=326057&view=rev
Log:
Resolved issue: DIRMINA-97 - ThreadPoolFilter doesn't shut down immediately.
* Added more state check sentences to fix

Modified:
    directory/network/trunk/src/java/org/apache/mina/filter/ThreadPoolFilter.java

Modified: directory/network/trunk/src/java/org/apache/mina/filter/ThreadPoolFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/filter/ThreadPoolFilter.java?rev=326057&r1=326056&r2=326057&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/filter/ThreadPoolFilter.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/filter/ThreadPoolFilter.java Tue Oct
18 02:21:35 2005
@@ -330,6 +330,11 @@
             {
                 for( ;; )
                 {
+                    if( shuttingDown )
+                    {
+                        return null;
+                    }
+
                     try
                     {
                         unfetchedSessionBuffers.waitForNewItem();
@@ -446,7 +451,7 @@
                     currentTime = System.currentTimeMillis();
                 }
 
-                boolean timeToLead = this == leader;
+                boolean timeToLead = this == leader && !shuttingDown;
 
                 if( !timeToLead )
                 {



Mime
View raw message