Skip to content

Commit

Permalink
Fix a problem where the ACK purge could crash on some messages (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell authored Jul 23, 2024
1 parent 28e5d45 commit 413b6b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mqtt_sessions_process.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ maybe_purge_ack(WaitAcks) ->
Now = mqtt_sessions_timestamp:timestamp(),
maps:filter(
fun
(_, #wait_for{ is_sent = true, message = Msg, queued = Queued }) ->
(_, #wait_for{ is_sent = true, message = Msg, queued = Queued }) when is_map(Msg) ->
Props = maps:get(properties, Msg, #{}),
Expiry = Queued + maps:get(message_expiry_interval, Props, ?MESSAGE_EXPIRY_DEFAULT),
Expiry > Now;
Expand Down

0 comments on commit 413b6b4

Please sign in to comment.