From 8b1e7121f8871b70145244b01d09a0050631a6a5 Mon Sep 17 00:00:00 2001 From: fhanik Date: Tue, 7 Aug 2007 15:48:08 +0000 Subject: [PATCH] Don't send out if there are no members git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@563534 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java index 6673ab35f..68aa27167 100644 --- a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java +++ b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java @@ -832,7 +832,10 @@ public class SimpleTcpCluster } 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); -- 2.11.0