File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/java/org/jivesoftware/openfire/plugin/util/cluster Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1717package org .jivesoftware .openfire .plugin .util .cluster ;
1818
1919import org .jivesoftware .openfire .RemotePacketRouter ;
20+ import org .jivesoftware .openfire .cluster .ClusterManager ;
2021import org .jivesoftware .util .cache .CacheFactory ;
2122import org .slf4j .Logger ;
2223import org .slf4j .LoggerFactory ;
@@ -37,13 +38,16 @@ public class ClusterPacketRouter implements RemotePacketRouter {
3738
3839 private static Logger logger = LoggerFactory .getLogger (ClusterPacketRouter .class );
3940
40- public boolean routePacket (byte [] nodeID , JID receipient , Packet packet ) {
41+ public boolean routePacket (byte [] nodeID , JID recipient , Packet packet ) {
4142 // Send the packet to the specified node and let the remote node deliver the packet to the recipient
4243 try {
43- CacheFactory .doClusterTask (new RemotePacketExecution (receipient , packet ), nodeID );
44+ if (!ClusterManager .isClusterMember (nodeID )) {
45+ return false ;
46+ }
47+ CacheFactory .doClusterTask (new RemotePacketExecution (recipient , packet ), nodeID );
4448 return true ;
45- } catch (IllegalStateException e ) {
46- logger .warn ("Error while routing packet to remote node: " + e );
49+ } catch (Exception e ) {
50+ logger .warn ("Error while routing packet to remote node" , e );
4751 return false ;
4852 }
4953 }
You can’t perform that action at this time.
0 commit comments