Aias00 opened a new issue, #6889: URL: https://github.com/apache/shenyu/issues/6889
## Description The CONNACK session-present flag is hard-coded `true` for every connection, including the very first connect and clients with the clean-session flag set. Combined with the complete absence of session-state persistence (`Disconnect.cleanChannel` only touches `ChannelRepository`; `Disconnect.java:39` carries `// todo Clean session`), the broker actively lies about stored session state. ## Location - `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/Connect.java:72` ## Impact Violates MQTT-3.2.2-6/7. A client reconnecting with `cleanSession=1` is told a session was present (must be `0`); a first-time client is told the same. ## Suggested fix Set `sessionPresent` from the connect-flags `cleanSession` bit and stored session state (false when `cleanSession=1` or no prior session). ## Related existing None. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
