fix: update the will message timestamp when it is ready to publish

This commit is contained in:
firest 2023-05-12 14:28:26 +08:00
parent 35cc8e3b77
commit dcd4640a57
1 changed files with 2 additions and 1 deletions

View File

@ -2146,7 +2146,8 @@ publish_will_msg(
ok; ok;
false -> false ->
NMsg = emqx_mountpoint:mount(MountPoint, Msg), NMsg = emqx_mountpoint:mount(MountPoint, Msg),
_ = emqx_broker:publish(NMsg), NMsg2 = NMsg#message{timestamp = erlang:system_time(millisecond)},
_ = emqx_broker:publish(NMsg2),
ok ok
end. end.