From 369314a5906cea5613c52e92164d695b037d7a92 Mon Sep 17 00:00:00 2001 From: Marc Worrell Date: Tue, 23 Jul 2024 14:54:45 +0200 Subject: [PATCH] Fix a problem where the ACK purge could crash on some messages --- src/mqtt_sessions_process.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt_sessions_process.erl b/src/mqtt_sessions_process.erl index 5020749..60e1e70 100644 --- a/src/mqtt_sessions_process.erl +++ b/src/mqtt_sessions_process.erl @@ -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;