fix(emqx_retainer): refresh the timestamp when dispatch retained message (#6148)
This commit is contained in:
parent
e7bbe98a7a
commit
66d0c44e36
|
@ -78,7 +78,8 @@ dispatch(Pid, Topic) ->
|
|||
false -> read_messages(Topic);
|
||||
true -> match_messages(Topic)
|
||||
end,
|
||||
[Pid ! {deliver, Topic, Msg} || Msg <- sort_retained(Msgs)].
|
||||
Now = erlang:system_time(millisecond),
|
||||
[Pid ! {deliver, Topic, Msg#message{timestamp = Now}} || Msg <- sort_retained(Msgs)].
|
||||
|
||||
%% RETAIN flag set to 1 and payload containing zero bytes
|
||||
on_message_publish(Msg = #message{flags = #{retain := true},
|
||||
|
|
Loading…
Reference in New Issue