Skip to content

Commit

Permalink
Use maps:size/1 here
Browse files Browse the repository at this point in the history
(cherry picked from commit 34b1cf6)
  • Loading branch information
michaelklishin authored and mergify[bot] committed Mar 16, 2024
1 parent ce1cf1a commit 0925a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/rabbit/src/rabbit_channel.erl
Expand Up @@ -1432,7 +1432,7 @@ handle_method(#'basic.consume'{queue = QueueNameBin,
authz_context = AuthzContext},
consumer_mapping = ConsumerMapping
}) ->
CurrentConsumers = length(maps:keys(ConsumerMapping)),
CurrentConsumers = maps:size(ConsumerMapping),
case maps:find(ConsumerTag, ConsumerMapping) of
error when CurrentConsumers >= MaxConsumers -> % false when MaxConsumers is 'infinity'
rabbit_misc:protocol_error(
Expand Down

0 comments on commit 0925a13

Please sign in to comment.