fix(emqx_channel): return Receive-Maximum in CONNACK when no error
This commit is contained in:
parent
811edb32a2
commit
cf22692c74
|
@ -2007,14 +2007,15 @@ merge_default_subopts(SubOpts) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Enrich ConnAck Caps
|
%% Enrich ConnAck Caps
|
||||||
|
|
||||||
enrich_connack_caps(
|
enrich_connack_caps(AckProps, ?IS_MQTT_V5 = Channel) ->
|
||||||
AckProps,
|
#channel{
|
||||||
?IS_MQTT_V5 = #channel{
|
|
||||||
clientinfo = #{
|
clientinfo = #{
|
||||||
zone := Zone
|
zone := Zone
|
||||||
|
},
|
||||||
|
conninfo = #{
|
||||||
|
receive_maximum := ReceiveMaximum
|
||||||
}
|
}
|
||||||
}
|
} = Channel,
|
||||||
) ->
|
|
||||||
#{
|
#{
|
||||||
max_packet_size := MaxPktSize,
|
max_packet_size := MaxPktSize,
|
||||||
max_qos_allowed := MaxQoS,
|
max_qos_allowed := MaxQoS,
|
||||||
|
@ -2029,7 +2030,8 @@ enrich_connack_caps(
|
||||||
'Topic-Alias-Maximum' => MaxAlias,
|
'Topic-Alias-Maximum' => MaxAlias,
|
||||||
'Wildcard-Subscription-Available' => flag(Wildcard),
|
'Wildcard-Subscription-Available' => flag(Wildcard),
|
||||||
'Subscription-Identifier-Available' => 1,
|
'Subscription-Identifier-Available' => 1,
|
||||||
'Shared-Subscription-Available' => flag(Shared)
|
'Shared-Subscription-Available' => flag(Shared),
|
||||||
|
'Receive-Maximum' => ReceiveMaximum
|
||||||
},
|
},
|
||||||
%% MQTT 5.0 - 3.2.2.3.4:
|
%% MQTT 5.0 - 3.2.2.3.4:
|
||||||
%% It is a Protocol Error to include Maximum QoS more than once,
|
%% It is a Protocol Error to include Maximum QoS more than once,
|
||||||
|
|
Loading…
Reference in New Issue