fix bug in retain as published flag
This commit is contained in:
parent
aa34258f1e
commit
47955f4309
|
@ -32,8 +32,8 @@
|
|||
-type(reason_code() :: 0..16#FF).
|
||||
-type(packet_id() :: 1..16#FFFF).
|
||||
-type(properties() :: #{atom() => term()}).
|
||||
-type(subopts() :: #{rh := 0 | 1,
|
||||
rap := 0 | 1 | 2,
|
||||
-type(subopts() :: #{rh := 0 | 1 | 2,
|
||||
rap := 0 | 1,
|
||||
nl := 0 | 1,
|
||||
qos := qos(),
|
||||
rc => reason_code()
|
||||
|
|
|
@ -726,7 +726,7 @@ run_dispatch_steps([{qos, SubQoS}|Steps], Msg = #message{qos = PubQoS}, State =
|
|||
run_dispatch_steps(Steps, Msg#message{qos = min(SubQoS, PubQoS)}, State);
|
||||
run_dispatch_steps([{qos, SubQoS}|Steps], Msg = #message{qos = PubQoS}, State = #state{upgrade_qos = true}) ->
|
||||
run_dispatch_steps(Steps, Msg#message{qos = max(SubQoS, PubQoS)}, State);
|
||||
run_dispatch_steps([{rap, false}|Steps], Msg = #message{flags = Flags}, State = #state{}) ->
|
||||
run_dispatch_steps([{rap, 0}|Steps], Msg = #message{flags = Flags}, State = #state{}) ->
|
||||
Flags1 = maps:put(retain, false, Flags),
|
||||
run_dispatch_steps(Steps, Msg#message{flags = Flags1}, State);
|
||||
run_dispatch_steps([{rap, _}|Steps], Msg, State) ->
|
||||
|
|
Loading…
Reference in New Issue