Merge pull request #6154 from lafirest/fix/revert_refresh_retained
Revert "fix(emqx_retainer): refresh the timestamp when dispatch retai…
This commit is contained in:
commit
5412cf4c78
|
@ -78,8 +78,7 @@ dispatch(Pid, Topic) ->
|
||||||
false -> read_messages(Topic);
|
false -> read_messages(Topic);
|
||||||
true -> match_messages(Topic)
|
true -> match_messages(Topic)
|
||||||
end,
|
end,
|
||||||
Now = erlang:system_time(millisecond),
|
[Pid ! {deliver, Topic, Msg} || Msg <- sort_retained(Msgs)].
|
||||||
[Pid ! {deliver, Topic, Msg#message{timestamp = Now}} || Msg <- sort_retained(Msgs)].
|
|
||||||
|
|
||||||
%% RETAIN flag set to 1 and payload containing zero bytes
|
%% RETAIN flag set to 1 and payload containing zero bytes
|
||||||
on_message_publish(Msg = #message{flags = #{retain := true},
|
on_message_publish(Msg = #message{flags = #{retain := true},
|
||||||
|
|
Loading…
Reference in New Issue