Fix for BZ49343.
authorkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 26 May 2010 11:58:55 +0000 (11:58 +0000)
committerkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 26 May 2010 11:58:55 +0000 (11:58 +0000)
When ChannelException is thrown, remove listener from channel.

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

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

index 9c853f6..05e2e71 100644 (file)
@@ -227,6 +227,10 @@ public abstract class AbstractReplicatedMap extends ConcurrentHashMap implements
             broadcast(MapMessage.MSG_START, true);
         } catch (ChannelException x) {
             log.warn("Unable to send map start message.");
+            // remove listener from channel
+            this.channel.removeChannelListener(this.rpcChannel);
+            this.channel.removeChannelListener(this);
+            this.channel.removeMembershipListener(this);
             throw new RuntimeException("Unable to start replicated map.",x);
         }
     }