code: @Override
      protected void shutdown() {
  
          if (client != null) {
              try {
                  client.disconnect();
              } catch (Exception e) {
                  LOGGER.log(Level.WARNING, "shutdown", e);
              }
              client = null;
          }
  
          instantShutdown();
      }
docs: Closes the connection by setting presence to unavailable and closing the
  HTTP client. The shutdown logic will be used during a planned disconnection or when
  dealing with an unexpected disconnection. Unlike {@link #disconnect()} the connection's
  BOSH stanza reader will not be removed; thus connection's state is kept.