You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand the difference between them.And the MQTT Client normal disconnect,they will be executed.As a result, both notifyClientDisconnected() and notifyClientConnectionLost() will be executed.
Event if (bindedSession.isClean()) { LOG.debug("Remove session for client {}", clientID); sessionRegistry.remove(bindedSession.getClientID()); } else { bindedSession.disconnect(); }
why is AND Logic?
Moquette MQTT version
branch:main
JVM version (e.g. java -version)
1.8
The text was updated successfully, but these errors were encountered:
method processDisconnect()
not cotain channel.attr(NettyUtils.ATTR_KEY_CLIENTID).set(null) logic
so this method(NewNettyMQTTHandler.java->channelInactive()->handleConnectionLost()->processConnectionLost) will execute
Minimal yet complete reproducer code (or URL to code) or complete log file
private void processConnectionLost(String clientID) { if (bindedSession.hasWill()) { postOffice.fireWill(bindedSession.getWill()); } if (bindedSession.isClean()) { LOG.debug("Remove session for client {}", clientID); sessionRegistry.remove(bindedSession.getClientID()); } else { bindedSession.disconnect(); } connected = false; //dispatch connection lost to intercept. String userName = NettyUtils.userName(channel); postOffice.dispatchConnectionLost(clientID,userName); LOG.trace("dispatch disconnection: userName={}", userName); }
`PostOffice.RouteResult processDisconnect(MqttMessage msg) {
final String clientID = NettyUtils.clientID(channel);
LOG.trace("Start DISCONNECT");
if (!connected) {
LOG.info("DISCONNECT received on already closed connection");
return PostOffice.RouteResult.success(clientID, CompletableFuture.completedFuture(null));
}
I don't understand the difference between them.And the MQTT Client normal disconnect,they will be executed.As a result, both notifyClientDisconnected() and notifyClientConnectionLost() will be executed.
Event
if (bindedSession.isClean()) { LOG.debug("Remove session for client {}", clientID); sessionRegistry.remove(bindedSession.getClientID()); } else { bindedSession.disconnect(); }
why is AND Logic?
Moquette MQTT version
branch:main
JVM version (e.g.
java -version
)1.8
The text was updated successfully, but these errors were encountered: