Fix BZ 42840
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 9 Jul 2007 20:52:52 +0000 (20:52 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 9 Jul 2007 20:52:52 +0000 (20:52 +0000)
http://issues.apache.org/bugzilla/show_bug.cgi?id=42840

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@554762 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

index 573a6d7..24fa6b1 100644 (file)
@@ -257,7 +257,10 @@ public abstract class AbstractReplicatedMap extends ConcurrentHashMap implements
             while ( it.hasNext() ) {
                 Map.Entry entry = (Map.Entry)it.next();
                 long access = ((Long)entry.getValue()).longValue(); 
-                if ( (now - access) > timeout ) memberDisappeared((Member)entry.getKey());
+                if ( (now - access) > timeout ) {
+                    it.remove();
+                    memberDisappeared( (Member) entry.getKey());
+                }
             }
         }//synch
     }