gongping.zhu created ARTEMIS-5254:
-------------------------------------

             Summary: MQTTSession.stop failure: Parameters not enabled.
                 Key: ARTEMIS-5254
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5254
             Project: ActiveMQ Artemis
          Issue Type: Bug
    Affects Versions: 2.38.0
            Reporter: gongping.zhu


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;
}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to