Author: fhanik
Date: Tue Aug  7 08:46:27 2007
New Revision: 563533

URL: http://svn.apache.org/viewvc?view=rev&rev=563533
Log:
Don't send the message if there are no members in the cluster
Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?view=diff&rev=563533&r1=563532&r2=563533
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
Tue Aug  7 08:46:27 2007
@@ -832,7 +832,10 @@
                 } else
                     log.error("Unable to send message to local member " + msg);
             } else {
-                channel.send(channel.getMembers(),msg,channelSendOptions);
+                if (channel.getMembers().length>0)
+                    channel.send(channel.getMembers(),msg,channelSendOptions);
+                else if (log.isDebugEnabled()) 
+                    log.debug("No members in cluster, ignoring message:"+msg);
             }
         } catch (Exception x) {
             log.error("Unable to send message through cluster sender.", x);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to