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:
Zaiming (Stone) Shi 2021-11-12 11:38:38 +01:00 committed by GitHub
commit 5412cf4c78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -78,8 +78,7 @@ dispatch(Pid, Topic) ->
false -> read_messages(Topic);
true -> match_messages(Topic)
end,
Now = erlang:system_time(millisecond),
[Pid ! {deliver, Topic, Msg#message{timestamp = Now}} || Msg <- sort_retained(Msgs)].
[Pid ! {deliver, Topic, Msg} || Msg <- sort_retained(Msgs)].
%% RETAIN flag set to 1 and payload containing zero bytes
on_message_publish(Msg = #message{flags = #{retain := true},