tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r563533 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
Date Tue, 07 Aug 2007 15:46:28 GMT
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message