private synchronized void reportLiveLocator(InetSocketAddress l) {
    Object prevState = locatorState.put(l, null);
    if (prevState != null) {
      logger.info("Communication has been restored with locator {}.", l);
    }
  }
This method will add bad locator only when locator with hostname and port is not already in
list.
geode-core/src/main/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImpl.java