Fix bad setting

This commit is contained in:
zhouzb 2020-01-17 10:11:38 +08:00
parent 3ee8d5c5ca
commit 227f8c74b1
1 changed files with 3 additions and 3 deletions

View File

@ -518,10 +518,10 @@ enrich_subopts([{qos, SubQoS}|Opts], Msg = #message{qos = PubQoS},
enrich_subopts(Opts, Msg#message{qos = min(SubQoS, PubQoS)}, Session);
enrich_subopts([{rap, 1}|Opts], Msg, Session) ->
enrich_subopts(Opts, Msg, Session);
enrich_subopts([{rap, 0}|Opts], Msg = #message{headers = #{retained := true}}, Session = #session{}) ->
enrich_subopts([{rap, 0}|Opts], Msg = #message{headers = #{retained := true}}, Session) ->
enrich_subopts(Opts, Msg, Session);
enrich_subopts([{rap, 0}|Opts], Msg = #message{flags = Flags}, Session) ->
enrich_subopts(Opts, Msg#message{flags = maps:put(retain, false, Flags)}, Session);
enrich_subopts([{rap, 0}|Opts], Msg, Session) ->
enrich_subopts(Opts, emqx_message:set_flag(retain, false, Msg), Session);
enrich_subopts([{subid, SubId}|Opts], Msg, Session) ->
Msg1 = emqx_message:set_header('Subscription-Identifier', SubId, Msg),
enrich_subopts(Opts, Msg1, Session).