Skip to content

Commit 20acb5e

Browse files
committed
fix topic alias max property in connection ack packet
1 parent 66489ec commit 20acb5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/ss/mqtt/broker/network/packet/in/ConnectAckInPacket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public class ConnectAckInPacket extends MqttReadablePacket {
121121
on this connection. If Topic Alias Maximum is absent or 0, the Client MUST NOT send any Topic Aliases on
122122
to the Server
123123
*/
124-
PacketProperty.TOPIC_ALIAS,
124+
PacketProperty.TOPIC_ALIAS_MAXIMUM,
125125
/*
126126
Followed by the UTF-8 Encoded String representing the reason associated with this response. This
127127
Reason String is a human readable string designed for diagnostics and SHOULD NOT be parsed by the

src/main/java/com/ss/mqtt/broker/network/packet/out/ConnectAck5OutPacket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ protected void writeProperties(@NotNull ByteBuffer buffer) {
325325
);
326326
writeProperty(
327327
buffer,
328-
PacketProperty.TOPIC_ALIAS,
328+
PacketProperty.TOPIC_ALIAS_MAXIMUM,
329329
client.getTopicAliasMaximum(),
330330
MqttPropertyConstants.TOPIC_ALIAS_MAXIMUM_DEFAULT
331331
);

0 commit comments

Comments
 (0)