code: void close() {
          if (logger.isLoggable(Level.FINER)) {
              logger.logp(Level.FINER, logger.getName(), "close", "Close called for " + RESTClientMessagesUtil.getObjID(this) + " within connection: "
                                                                  + connector.getConnectionId());
          }
  
          closePollingThread();
  
          if (notificationRegistry != null) {
              notificationRegistry.close();
          }
  
          if (connector.logFailovers()) {
              String disconnectMsg = RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.MEMBER_DISCONNECT, connector.getCurrentEndpoint());
              logger.logp(Level.INFO, logger.getName(), "close", disconnectMsg);
          }
  
          disconnect();
      }
docs: do the proper cleaning procedures.