docs: private void addShutdownHook(boolean isClient) {
          if (shutdownHook == null) {
              shutdownHook = new ShutdownHook(isClient);
              Runtime.getRuntime().addShutdownHook(shutdownHook);
          }
      }