Skip to content

Commit

Permalink
ns
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Jun 17, 2023
1 parent 2c0fa10 commit 9da3a9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/org/jgroups/demos/RelayDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected boolean process(String line) {
return true;
}
if(line.equalsIgnoreCase("topo")) {
Topology topo=relay.topo().refresh();
Topology topo=relay.topo().removeAll(null).refresh();
Util.sleep(100);
System.out.printf("\n%s\n", topo.print());
return true;
Expand Down
5 changes: 4 additions & 1 deletion src/org/jgroups/protocols/relay/Topology.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public String print(String site) {
}

public Topology removeAll(Collection<String> sites) {
cache.keySet().removeAll(sites);
if(sites == null)
cache.keySet().clear();
else
cache.keySet().removeAll(sites);
return this;
}

Expand Down

0 comments on commit 9da3a9f

Please sign in to comment.