Permalink
Browse files

checking for multicast message

  • Loading branch information...
1 parent dcba518 commit debe87575bf31ea85b1b7ae8a48a558e4bc7b566 Bela Ban committed Feb 28, 2011
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/org/jgroups/protocols/RELAY.java
@@ -153,14 +153,22 @@ public Object down(Event evt) {
case Event.MSG:
Message msg=(Message)evt.getArg();
Address dest=msg.getDest();
-
+ if(dest == null || dest.isMulticastAddress())
+ break; // don't handle multicast destinations
+
// forward non local destinations to the coordinator, to relay to the remote cluster
if(remote_cache.contains(dest)) { // the message is forwarded to the remote cluster
forwardToCoord(msg);
return null;
}
- else if(dest instanceof ProxyAddress) // the message is sent to the local cluster
- msg.setDest(((ProxyAddress)dest).getOriginalAddress());
+ else {
+ if(local_view.containsMember(dest)) {
+ break;
+ }
+ if(dest instanceof ProxyAddress) { // the message is sent to the local cluster
+ msg.setDest(((ProxyAddress)dest).getOriginalAddress());
+ }
+ }
break;
case Event.VIEW_CHANGE:

0 comments on commit debe875

Please sign in to comment.