Skip to content

Commit 34b1cf6

Browse files
Use maps:size/1 here
1 parent 3564df8 commit 34b1cf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_channel.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ handle_method(#'basic.consume'{queue = QueueNameBin,
13771377
authz_context = AuthzContext},
13781378
consumer_mapping = ConsumerMapping
13791379
}) ->
1380-
CurrentConsumers = length(maps:keys(ConsumerMapping)),
1380+
CurrentConsumers = maps:size(ConsumerMapping),
13811381
case maps:find(ConsumerTag, ConsumerMapping) of
13821382
error when CurrentConsumers >= MaxConsumers -> % false when MaxConsumers is 'infinity'
13831383
rabbit_misc:protocol_error(

0 commit comments

Comments
 (0)