We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebd67ad commit adb5ec6Copy full SHA for adb5ec6
broker/src/main/java/io/moquette/broker/MQTTConnection.java
@@ -210,7 +210,7 @@ PostOffice.RouteResult processConnect(MqttConnectMessage msg) {
210
final boolean cleanSession = msg.variableHeader().isCleanSession();
211
final boolean serverGeneratedClientId;
212
if (clientId == null || clientId.isEmpty()) {
213
- if (isNotProtocolVersion(msg, MqttVersion.MQTT_5)) {
+ if (isNotProtocolVersion(msg, MqttVersion.MQTT_5) && isNotProtocolVersion(msg, MqttVersion.MQTT_3_1_1)) {
214
if (!brokerConfig.isAllowZeroByteClientId()) {
215
LOG.info("Broker doesn't permit MQTT empty client ID. Username: {}", username);
216
abortConnection(CONNECTION_REFUSED_IDENTIFIER_REJECTED);
0 commit comments