From 0514933667742767176815702c1bbd1d877f4ef4 Mon Sep 17 00:00:00 2001 From: Marc Worrell Date: Tue, 28 May 2024 16:11:23 +0200 Subject: [PATCH] Fix dialyzer warnings --- src/mqtt_sessions_process.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqtt_sessions_process.erl b/src/mqtt_sessions_process.erl index d799d42..28ad24b 100644 --- a/src/mqtt_sessions_process.erl +++ b/src/mqtt_sessions_process.erl @@ -981,7 +981,7 @@ queue_1(#{ type := Type } = Msg, #state{ msg_nr = MsgNr, pending = Pending } = S State#state{ pending = queue:in(Item, Pending)}. maybe_purge(#state{ pending = Queue, awaiting_ack = WaitAcks } = State) -> - case queue:len(Queue) > ?MAX_INFLIGHT orelse size(WaitAcks) > ?MAX_INFLIGHT_ACK of + case queue:len(Queue) > ?MAX_INFLIGHT orelse maps:size(WaitAcks) > ?MAX_INFLIGHT_ACK of true -> PurgedQueue = purge(Queue), PacketIds = queue:fold( @@ -1017,7 +1017,7 @@ purge(Queue) -> case queue:len(Queue1) > ?MAX_INFLIGHT of true -> % Drop all QoS 0 messages - cleanup_pending_qos0(Queue1); + queue:filter(fun(#queued{ qos = QoS }) -> QoS > 0 end, Queue1); false -> Queue1 end.