Skip to content

Commit

Permalink
fix: update the will message timestamp when it is ready to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
lafirest committed May 12, 2023
1 parent 35cc8e3 commit dcd4640
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/emqx/src/emqx_channel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,8 @@ publish_will_msg(
ok;
false ->
NMsg = emqx_mountpoint:mount(MountPoint, Msg),
_ = emqx_broker:publish(NMsg),
NMsg2 = NMsg#message{timestamp = erlang:system_time(millisecond)},
_ = emqx_broker:publish(NMsg2),
ok
end.

Expand Down

0 comments on commit dcd4640

Please sign in to comment.