Skip to content

Commit

Permalink
Fix dialyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell committed May 28, 2024
1 parent 4bd69f2 commit 0514933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mqtt_sessions_process.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 0514933

Please sign in to comment.