private boolean areAllUserRegionsOffline() {
    if (getNumberOfOnlineRegions() > 2) {
      return false;
    }
    boolean allUserRegionsOffline = true;
    for (Map.Entry<String, HRegion> e : this.onlineRegions.entrySet()) {
      if (!e.getValue().getRegionInfo().isMetaRegion()) {
        allUserRegionsOffline = false;
        break;
      }
    }
    return allUserRegionsOffline;
  }
The HRegionServer sticks in this loop until closed.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java