code: void unregister(AbstractAppHandle handle) {
      for (Map.Entry<String, AbstractAppHandle> e : secretToPendingApps.entrySet()) {
        if (e.getValue().equals(handle)) {
          String secret = e.getKey();
          secretToPendingApps.remove(secret);
          break;
        }
      }
  
      unref();
    }
docs: Removes the client handle from the pending list (in case it's still there), and unrefs
  the server.