Skip to content

Commit

Permalink
feat: remove redundant address check
Browse files Browse the repository at this point in the history
  • Loading branch information
caicancai committed Jun 29, 2024
1 parent a0eed3f commit 44be559
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public static NodeManager getInstance() {
* Return true when RPC service is registered.
*/
public boolean serverExists(final Endpoint addr) {
if (addr.getIp().equals(Utils.IP_ANY)) {
return this.addrSet.contains(new Endpoint(Utils.IP_ANY, addr.getPort()));
}
return this.addrSet.contains(addr);
}

Expand Down

0 comments on commit 44be559

Please sign in to comment.