tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r399059 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastMembership.java
Date Tue, 02 May 2006 21:42:43 GMT
Author: fhanik
Date: Tue May  2 14:42:43 2006
New Revision: 399059

URL: http://svn.apache.org/viewcvs?rev=399059&view=rev
Log:
Fixed a small bug with soft shutdown in the membership layer

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastMembership.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastMembership.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastMembership.java?rev=399059&r1=399058&r2=399059&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastMembership.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastMembership.java
Tue May  2 14:42:43 2006
@@ -131,6 +131,7 @@
      * @param member The member to remove
      */
     protected void removeMcastMember(MemberImpl member) {
+        map.remove(member);
         synchronized (members) {
             int n = -1;
             for (int i = 0; i < members.length; i++) {
@@ -178,7 +179,6 @@
             MemberImpl[] result = new MemberImpl[list.size()];
             list.toArray(result);
             for( int j=0; j<result.length; j++) {
-                map.remove(result[j]);
                 removeMcastMember(result[j]);
             }
             return result;
@@ -190,7 +190,7 @@
     /**
      * Returning that service has members or not
      */
-    public synchronized boolean hasMembers() {
+    public boolean hasMembers() {
         return members.length > 0 ;
     }
     
@@ -211,7 +211,7 @@
      * Returning a list of all the members in the membership
      * We not need a copy: add and remove generate new arrays.
      */
-    public synchronized MemberImpl[] getMembers() {
+    public MemberImpl[] getMembers() {
         if(hasMembers()) {
             return members;
         } else {



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


Mime
View raw message