diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java index 887123dda..aa3a2fab1 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java @@ -447,21 +447,6 @@ class ServerAddressIterator implements Iterator { iter = sorted.iterator(); } - // Consider adding a penalty mechanism, with the offending node coming last - - public ServerAddressIterator(List source, String errServerIp) { - sorted = new ArrayList(); - for (String address : source) { - if (address.equals(errServerIp)) { - continue; - } - sorted.add(new RandomizedServerAddress(address)); - } - Collections.sort(sorted); - sorted.add(new RandomizedServerAddress(errServerIp)); - iter = sorted.iterator(); - } - @Override public boolean hasNext() { return iter.hasNext();