Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-9745

MQTTSession.stop failure: Parameters not enabled.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None

      void stop(boolean failure) throws Exception {
      state.setFailed(failure);
      
      if (!stopped) {
      protocolHandler.stop();
      subscriptionManager.stop();
      mqttPublishManager.stop();
      
      if (serverSession != null) {
      serverSession.stop();
      serverSession.close(false);//need replace
      }
      
      if (internalServerSession != null) {
      internalServerSession.stop();
      internalServerSession.close(false);//need replace
      }
      
      state.setAttached(false);//need replace
      state.setDisconnectedTime(System.currentTimeMillis());
      state.clearTopicAliases();
      
      if (getVersion() == MQTTVersion.MQTT_5) {
      if (state.getClientSessionExpiryInterval() == 0) {
      if (state.isWill() && failure) {
      // If the session expires the will message must be sent no matter the will delay
      sendWillMessage();
      }
      clean(false);
      stateManager.removeSessionState(connection.getClientID());
      }
      } else {
      if (state.isWill() && failure) {
      sendWillMessage();
      }
      if (isClean()) {
      clean(false);
      stateManager.removeSessionState(connection.getClientID());
      }
      }
      }
      stopped = true;
      }

              rhn-support-jbertram Justin Bertram
              rh-messaging-ci Messaging CI
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: