code: @Override
      public void close() throws IOException {
          if (gracefulShutdown) {
              Util.safelyRemoveShutdownHook(shutDownHook);
              shutDownHook.enabled = false;
          }
  
          doClose();
      }
docs: {@inheritDoc}.
  <p>
  Closing the {@link AsyncConnection} will attempt a graceful shutdown of the {@link #executorService} with a
  timeout of {@link #shutdownTimeout}, allowing the current events to be submitted while new events will
  be rejected.<br>
  If the shutdown times out, the {@code executorService} will be forced to shutdown.