@Override
  public void removeAlertListener(AlertListener listener) {
    synchronized (alertLock) {
      Set<AlertListener> oldListeners = alertListeners;
      if (oldListeners.contains(listener)) { // fixed bug 34687
        Set<AlertListener> newListeners = new HashSet<>(oldListeners);
        if (newListeners.remove(listener)) {
          alertListeners = newListeners;
        }
      }
    }
  }
Checks to make sure that {@link #connect()} has been called.

@throws IllegalStateException If {@link #connect()} has not been called.
geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java